don't warn about empty macro arguments in c++'0x mode, since it sucked in

the c99 preprocessor.  Patch by Jonathan Sauer!

llvm-svn: 130031
This commit is contained in:
Chris Lattner 2011-04-22 23:25:09 +00:00
parent dcb3ebeb2c
commit 9fa385d437

View File

@ -410,9 +410,9 @@ MacroArgs *Preprocessor::ReadFunctionLikeMacroArgs(Token &MacroName,
return 0;
}
// Empty arguments are standard in C99 and supported as an extension in
// Empty arguments are standard in C99 and C++0x, and are supported as an extension in
// other modes.
if (ArgTokens.size() == ArgTokenStart && !Features.C99)
if (ArgTokens.size() == ArgTokenStart && !Features.C99 && !Features.CPlusPlus0x)
Diag(Tok, diag::ext_empty_fnmacro_arg);
// Add a marker EOF token to the end of the token list for this argument.