]> granicus.if.org Git - clang/commitdiff
don't warn about empty macro arguments in c++'0x mode, since it sucked in
authorChris Lattner <sabre@nondot.org>
Fri, 22 Apr 2011 23:25:09 +0000 (23:25 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 22 Apr 2011 23:25:09 +0000 (23:25 +0000)
the c99 preprocessor.  Patch by Jonathan Sauer!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130031 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/PPMacroExpansion.cpp

index b078bc8577433667d7c5a1b68dda3196723594c6..f0b0fad488f5b9925c4e4f780ee4954489e906f1 100644 (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.