From: Chris Lattner Date: Fri, 22 Apr 2011 23:25:09 +0000 (+0000) Subject: don't warn about empty macro arguments in c++'0x mode, since it sucked in X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=32c1388f0feef4ea147f881415f5a7225e8cadcc;p=clang don't warn about empty macro arguments in c++'0x mode, since it sucked in the c99 preprocessor. Patch by Jonathan Sauer! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130031 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Lex/PPMacroExpansion.cpp b/lib/Lex/PPMacroExpansion.cpp index b078bc8577..f0b0fad488 100644 --- a/lib/Lex/PPMacroExpansion.cpp +++ b/lib/Lex/PPMacroExpansion.cpp @@ -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.