From: Argyrios Kyrtzidis Date: Sat, 8 Mar 2014 21:18:26 +0000 (+0000) Subject: [Preprocessor] Only check for -Wunused-macros if the translation unit kind is TU_Comp... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=026af422181741967695ad04cf3204b92fead58c;p=clang [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 --- 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.