aboutsummaryrefslogtreecommitdiff
path: root/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
commit88a35862fbe473f2a4f0c19f24dbe536937e1dc6 (patch)
tree26566bd2b4332e7f9ac6209ad3d2ef10b4e20958 /lib/Lex/PPLexerChange.cpp
parent5be028f84243e0f6906c259e67cbdaf9bee431b2 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92497 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PPLexerChange.cpp')
-rw-r--r--lib/Lex/PPLexerChange.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Lex/PPLexerChange.cpp b/lib/Lex/PPLexerChange.cpp
index ce1b19ca7c..0b26ccbecb 100644
--- a/lib/Lex/PPLexerChange.cpp
+++ b/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);
}