summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-02-16 00:54:02 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-02-16 00:54:02 +0000
commit90e7c129611ec9e9c9df970f8a68d37e3330c0c8 (patch)
treeaf4dc5ac7180e83e5bd2c21e617fc9c966a049e8 /clang
parentc458885c58495fa235415a97b1a8cc096a8e98c1 (diff)
downloadbcm5719-llvm-90e7c129611ec9e9c9df970f8a68d37e3330c0c8.tar.gz
bcm5719-llvm-90e7c129611ec9e9c9df970f8a68d37e3330c0c8.zip
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. llvm-svn: 150643
Diffstat (limited to 'clang')
-rw-r--r--clang/include/clang/Basic/DiagnosticSemaKinds.td3
-rw-r--r--clang/test/SemaCXX/cxx0x-initializer-aggregates.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td
index 95514017dcd..376a3f31a94 100644
--- a/clang/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/clang/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/clang/test/SemaCXX/cxx0x-initializer-aggregates.cpp b/clang/test/SemaCXX/cxx0x-initializer-aggregates.cpp
index b5fa5fe143c..48888d0eb0b 100644
--- a/clang/test/SemaCXX/cxx0x-initializer-aggregates.cpp
+++ b/clang/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}}
}
OpenPOWER on IntegriCloud