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

llvm-svn: 203360
This commit is contained in:
Argyrios Kyrtzidis 2014-03-08 21:18:26 +00:00
parent 9174593d09
commit 8ed7414e58
1 changed files with 1 additions and 1 deletions

View 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.