[cfe-commits] r38573 - /cfe/cfe/trunk/Lex/Preprocessor.cpp
sabre at cs.uiuc.edu
sabre at cs.uiuc.edu
Wed Jul 11 09:22:50 PDT 2007
Author: sabre
Date: Wed Jul 11 11:22:49 2007
New Revision: 38573
URL: http://llvm.org/viewvc/llvm-project?rev=38573&view=rev
Log:
Fix Preprocessor/poison_expansion.c
Modified:
cfe/cfe/trunk/Lex/Preprocessor.cpp
Modified: cfe/cfe/trunk/Lex/Preprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Lex/Preprocessor.cpp?rev=38573&r1=38572&r2=38573&view=diff
==============================================================================
--- cfe/cfe/trunk/Lex/Preprocessor.cpp (original)
+++ cfe/cfe/trunk/Lex/Preprocessor.cpp Wed Jul 11 11:22:49 2007
@@ -417,7 +417,9 @@
}
IdentifierTokenInfo &ITI = *Identifier.getIdentifierInfo();
- if (ITI.isPoisoned())
+ // If this identifier was poisoned, and if it was not produced from a macro
+ // expansion, emit an error.
+ if (ITI.isPoisoned() && CurLexer)
Diag(Identifier, diag::err_pp_used_poisoned_id);
if (MacroInfo *MI = ITI.getMacroInfo()) {
More information about the cfe-commits
mailing list