[cfe-commits] r138257 - /cfe/trunk/lib/Lex/PPDirectives.cpp

Eli Friedman eli.friedman at gmail.com
Mon Aug 22 11:48:28 PDT 2011


Author: efriedma
Date: Mon Aug 22 13:48:28 2011
New Revision: 138257

URL: http://llvm.org/viewvc/llvm-project?rev=138257&view=rev
Log:
Don't warn on varaidic macros in C++0x mode.


Modified:
    cfe/trunk/lib/Lex/PPDirectives.cpp

Modified: cfe/trunk/lib/Lex/PPDirectives.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPDirectives.cpp?rev=138257&r1=138256&r2=138257&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PPDirectives.cpp (original)
+++ cfe/trunk/lib/Lex/PPDirectives.cpp Mon Aug 22 13:48:28 2011
@@ -1298,8 +1298,8 @@
       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);





More information about the cfe-commits mailing list