]> granicus.if.org Git - clang/commitdiff
[Preprocessor] Only check for -Wunused-macros if the translation unit kind is TU_Comp...
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Sat, 8 Mar 2014 21:18:26 +0000 (21:18 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Sat, 8 Mar 2014 21:18:26 +0000 (21:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203360 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/PPLexerChange.cpp

index 80f863dcdaa49f87b3b21bca42dda63d7438ac37..949cd632620e09152a7245db48db3f9701f63f72 100644 (file)
@@ -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.