diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-02-16 00:54:02 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-02-16 00:54:02 +0000 |
commit | 9f02d6d2b7d62971ea619b4d0a6e68508e50ec24 (patch) | |
tree | 66adf363f30e9b572f56e7dcae57530f330ea9c7 | |
parent | 45fb99578174f52abd9f7c1c4d3e692ca62ed6e5 (diff) |
Mark the parenthesized array member initialization diagnostic as DefaultError,
and move it out of -Wgnu so that -Wno-gnu leaves it enabled. As requested by
Eli.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150643 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Basic/DiagnosticSemaKinds.td | 3 | ||||
-rw-r--r-- | test/SemaCXX/cxx0x-initializer-aggregates.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 95514017dc..376a3f31a9 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -3551,9 +3551,10 @@ def err_array_init_non_constant_array : Error< def ext_array_init_copy : Extension< "initialization of an array of type %0 from a compound literal of type %1 is " "a GNU extension">, InGroup<GNU>; +// This is intentionally not disabled by -Wno-gnu. def ext_array_init_parens : ExtWarn< "parenthesized initialization of a member array is a GNU extension">, - InGroup<GNU>; + InGroup<DiagGroup<"gnu-array-member-paren-init">>, DefaultError; def warn_deprecated_string_literal_conversion : Warning< "conversion from string literal to %0 is deprecated">, InGroup<DeprecatedWritableStr>; def err_realimag_invalid_type : Error<"invalid type %0 to %1 operator">; diff --git a/test/SemaCXX/cxx0x-initializer-aggregates.cpp b/test/SemaCXX/cxx0x-initializer-aggregates.cpp index b5fa5fe143..48888d0eb0 100644 --- a/test/SemaCXX/cxx0x-initializer-aggregates.cpp +++ b/test/SemaCXX/cxx0x-initializer-aggregates.cpp @@ -71,5 +71,5 @@ namespace aggregate { static_assert(sizeof(overloaded({1})) == sizeof(one), "bad overload"); } - struct C { int a[2]; C():a({1, 2}) { } }; // expected-warning {{parenthesized initialization of a member array is a GNU extension}} + struct C { int a[2]; C():a({1, 2}) { } }; // expected-error {{parenthesized initialization of a member array is a GNU extension}} } |