aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Lex/Lexer.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erikjv@me.com>2017-07-05 09:44:07 +0000
committerErik Verbruggen <erikjv@me.com>2017-07-05 09:44:07 +0000
commit795eee96b3c60bbfbdfafba1d8562db07d82b3a9 (patch)
treef8413a04fbfe61d9728cf9798e532e335f321be7 /clang/lib/Lex/Lexer.cpp
parentd93a35ae40bc44e1bae4af69c6b10ba76846781a (diff)
downloadllvm-795eee96b3c60bbfbdfafba1d8562db07d82b3a9.zip
llvm-795eee96b3c60bbfbdfafba1d8562db07d82b3a9.tar.gz
llvm-795eee96b3c60bbfbdfafba1d8562db07d82b3a9.tar.bz2
Fix invalid warnings for header guards in preambles
Fixes https://bugs.llvm.org/show_bug.cgi?id=33574 Differential Revision: https://reviews.llvm.org/D34882 llvm-svn: 307134
Diffstat (limited to 'clang/lib/Lex/Lexer.cpp')
-rw-r--r--clang/lib/Lex/Lexer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Lex/Lexer.cpp b/clang/lib/Lex/Lexer.cpp
index 012189a..61bcef8c 100644
--- a/clang/lib/Lex/Lexer.cpp
+++ b/clang/lib/Lex/Lexer.cpp
@@ -2550,7 +2550,7 @@ bool Lexer::LexEndOfFile(Token &Result, const char *CurPtr) {
return true;
}
- if (PP->isRecordingPreamble() && !PP->isInMainFile()) {
+ if (PP->isRecordingPreamble() && PP->isInPrimaryFile()) {
PP->setRecordedPreambleConditionalStack(ConditionalStack);
ConditionalStack.clear();
}