The optimized case has to treat __VA_ARGS__ as an argument. This fixes

test/Preprocessor/macro_rescan_varargs.c

llvm-svn: 38795
This commit is contained in:
Chris Lattner 2006-07-29 07:33:01 +00:00
parent 8d31b5d1aa
commit 273ddd5c57
1 changed files with 5 additions and 0 deletions

View File

@ -542,6 +542,11 @@ static bool isTrivialSingleTokenExpansion(const MacroInfo *MI,
I != E; ++I)
if (*I == II)
return false; // Identifier is a macro argument.
// If the argument is the __VA_ARGS__ token, we can't fast expand it.
if (!strcmp(II->getName(), "__VA_ARGS__"))
return false; // Identifier is macro argument.
return true;
}