summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/PPLexerChange.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-01-04 19:18:44 +0000
committerDouglas Gregor <dgregor@apple.com>2010-01-04 19:18:44 +0000
commit9882a5aac6ec67f8b0935617965f61d2519875a7 (patch)
tree43b7b826461d443663e1b43335e37cbdec64ffbb /clang/lib/Lex/PPLexerChange.cpp
parent7af1efc1aebe13773bbae13fce859d03528755a1 (diff)
downloadbcm5719-llvm-9882a5aac6ec67f8b0935617965f61d2519875a7.tar.gz
bcm5719-llvm-9882a5aac6ec67f8b0935617965f61d2519875a7.zip
Teach Preprocessor::macro_begin/macro_end to lazily load all macro
definitions from a precompiled header. This ensures that code-completion with macro names behaves the same with or without precompiled headers. llvm-svn: 92497
Diffstat (limited to 'clang/lib/Lex/PPLexerChange.cpp')
-rw-r--r--clang/lib/Lex/PPLexerChange.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Lex/PPLexerChange.cpp b/clang/lib/Lex/PPLexerChange.cpp
index ce1b19ca7c1..0b26ccbecba 100644
--- a/clang/lib/Lex/PPLexerChange.cpp
+++ b/clang/lib/Lex/PPLexerChange.cpp
@@ -249,7 +249,8 @@ bool Preprocessor::HandleEndOfFile(Token &Result, bool isEndOfMacro) {
// diagnostic is enabled, look for macros that have not been used.
if (getDiagnostics().getDiagnosticLevel(diag::pp_macro_not_used) !=
Diagnostic::Ignored) {
- for (macro_iterator I = macro_begin(), E = macro_end(); I != E; ++I)
+ for (macro_iterator I = macro_begin(false), E = macro_end(false);
+ I != E; ++I)
if (!I->second->isUsed())
Diag(I->second->getDefinitionLoc(), diag::pp_macro_not_used);
}
OpenPOWER on IntegriCloud