]> granicus.if.org Git - clang/commitdiff
Back out __decltype warning from r151377: we should either warn on all the GNU
authorRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 24 Feb 2012 22:30:04 +0000 (22:30 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 24 Feb 2012 22:30:04 +0000 (22:30 +0000)
__keywords or none of them.

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

include/clang/Basic/DiagnosticParseKinds.td
lib/Parse/ParseDeclCXX.cpp
test/SemaCXX/decltype-98.cpp

index b3f2067ff68c98aba318ef08c1425bc318d689b3..95288acb86c9444613cab7da8f837cbf4bc2f720 100644 (file)
@@ -254,9 +254,6 @@ def err_missing_comma_before_ellipsis : Error<
   "C requires a comma prior to the ellipsis in a variadic function type">;
 def err_unexpected_typedef_ident : Error<
   "unexpected type name %0: expected identifier">;
-def ext_gnu_decltype : Extension<
-  "'__decltype' type specifier is a GNU extension">,
-  InGroup<GNU>, DefaultIgnore;
 def warn_cxx98_compat_decltype : Warning<
   "'decltype' type specifier is incompatible with C++98">,
   InGroup<CXX98Compat>, DefaultIgnore;
index 5468700bc92544209a363a92abde1410b70a1def..d798281f40f8ce4eacab82100354af628a7afa3e 100644 (file)
@@ -653,8 +653,8 @@ SourceLocation Parser::ParseDecltypeSpecifier(DeclSpec &DS) {
       return EndLoc;
     }
   } else {
-    Diag(Tok, Tok.getIdentifierInfo()->isStr("decltype")
-           ? diag::warn_cxx98_compat_decltype : diag::ext_gnu_decltype);
+    if (Tok.getIdentifierInfo()->isStr("decltype"))
+      Diag(Tok, diag::warn_cxx98_compat_decltype);
 
     ConsumeToken();
 
index 44d5896c53eaf98fc8fc4fd0b40f4379b4ecb351..db52565e6c74628ffefd94428bbfcb09fe246143 100644 (file)
@@ -1,3 +1,3 @@
-// RUN: %clang_cc1 -std=c++98 -fsyntax-only -verify %s -Wgnu
+// RUN: %clang_cc1 -std=c++98 -fsyntax-only -verify %s
 extern int x;
-__decltype(1) x = 3; // expected-warning {{is a GNU extension}}
+__decltype(1) x = 3;