From 026af422181741967695ad04cf3204b92fead58c Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Sat, 8 Mar 2014 21:18:26 +0000 Subject: [PATCH] [Preprocessor] Only check for -Wunused-macros if the translation unit kind is TU_Complete. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203360 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Lex/PPLexerChange.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Lex/PPLexerChange.cpp b/lib/Lex/PPLexerChange.cpp index 80f863dcda..949cd63262 100644 --- a/lib/Lex/PPLexerChange.cpp +++ b/lib/Lex/PPLexerChange.cpp @@ -427,7 +427,7 @@ bool Preprocessor::HandleEndOfFile(Token &Result, bool isEndOfMacro) { if (!isIncrementalProcessingEnabled()) CurPPLexer = 0; - if (TUKind != TU_Prefix) { + if (TUKind == TU_Complete) { // This is the end of the top-level file. 'WarnUnusedMacroLocs' has // collected all macro locations that we need to warn because they are not // used. -- 2.50.1