summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2014-03-08 21:18:26 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2014-03-08 21:18:26 +0000
commit026af422181741967695ad04cf3204b92fead58c (patch)
treeb8bde4fe2b29d27c5bf5f667e6ce43c1295bdea6
parent8328f6462b3e0b8d77a2da5cfbdf1885950e5fc8 (diff)
downloadclang-026af422181741967695ad04cf3204b92fead58c.tar.gz
clang-026af422181741967695ad04cf3204b92fead58c.tar.bz2
clang-026af422181741967695ad04cf3204b92fead58c.tar.xz
[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
-rw-r--r--lib/Lex/PPLexerChange.cpp2
1 files changed, 1 insertions, 1 deletions
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.