Back out __decltype warning from r151377: we should either warn on all the GNU
__keywords or none of them. llvm-svn: 151401
This commit is contained in:
parent
5f640e35e3
commit
324df5564e
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue