]> granicus.if.org Git - clang/commitdiff
Don't warn on varaidic macros in C++0x mode.
authorEli Friedman <eli.friedman@gmail.com>
Mon, 22 Aug 2011 18:48:28 +0000 (18:48 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Mon, 22 Aug 2011 18:48:28 +0000 (18:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138257 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/PPDirectives.cpp

index 383c6f5aa1629270af277724b732e9a0b3103e5a..39a358d976e6ac9bb6e8d11e597019a299fc918c 100644 (file)
@@ -1298,8 +1298,8 @@ bool Preprocessor::ReadMacroDefinitionArgList(MacroInfo *MI) {
       Diag(Tok, diag::err_pp_expected_ident_in_arg_list);
       return true;
     case tok::ellipsis:  // #define X(... -> C99 varargs
-      // Warn if use of C99 feature in non-C99 mode.
-      if (!Features.C99) Diag(Tok, diag::ext_variadic_macro);
+      if (!Features.C99 && !Features.CPlusPlus0x)
+        Diag(Tok, diag::ext_variadic_macro);
 
       // Lex the token after the identifier.
       LexUnexpandedToken(Tok);