From 9882a5aac6ec67f8b0935617965f61d2519875a7 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Mon, 4 Jan 2010 19:18:44 +0000 Subject: 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 --- clang/lib/Lex/PPLexerChange.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/Lex/PPLexerChange.cpp') 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); } -- cgit v1.2.3