Fix Preprocessor/poison_expansion.c

llvm-svn: 38573
This commit is contained in:
Chris Lattner 2006-06-25 05:41:00 +00:00
parent 36f0003d16
commit ba6df9122f
1 changed files with 3 additions and 1 deletions

View File

@ -417,7 +417,9 @@ void Preprocessor::HandleIdentifier(LexerToken &Identifier) {
}
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()) {