r203360 - [Preprocessor] Only check for -Wunused-macros if the translation unit kind is TU_Complete.

Argyrios Kyrtzidis akyrtzi at gmail.com
Sat Mar 8 13:18:27 PST 2014


Author: akirtzidis
Date: Sat Mar  8 15:18:26 2014
New Revision: 203360

URL: http://llvm.org/viewvc/llvm-project?rev=203360&view=rev
Log:
[Preprocessor] Only check for -Wunused-macros if the translation unit kind is TU_Complete.

Modified:
    cfe/trunk/lib/Lex/PPLexerChange.cpp

Modified: cfe/trunk/lib/Lex/PPLexerChange.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPLexerChange.cpp?rev=203360&r1=203359&r2=203360&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PPLexerChange.cpp (original)
+++ cfe/trunk/lib/Lex/PPLexerChange.cpp Sat Mar  8 15:18:26 2014
@@ -427,7 +427,7 @@ bool Preprocessor::HandleEndOfFile(Token
   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.





More information about the cfe-commits mailing list