[cfe-commits] r150643 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td test/SemaCXX/cxx0x-initializer-aggregates.cpp
Richard Smith
richard-llvm at metafoo.co.uk
Wed Feb 15 16:54:02 PST 2012
Author: rsmith
Date: Wed Feb 15 18:54:02 2012
New Revision: 150643
URL: http://llvm.org/viewvc/llvm-project?rev=150643&view=rev
Log:
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.
Modified:
cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
cfe/trunk/test/SemaCXX/cxx0x-initializer-aggregates.cpp
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=150643&r1=150642&r2=150643&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Wed Feb 15 18:54:02 2012
@@ -3551,9 +3551,10 @@
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">;
Modified: cfe/trunk/test/SemaCXX/cxx0x-initializer-aggregates.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/cxx0x-initializer-aggregates.cpp?rev=150643&r1=150642&r2=150643&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/cxx0x-initializer-aggregates.cpp (original)
+++ cfe/trunk/test/SemaCXX/cxx0x-initializer-aggregates.cpp Wed Feb 15 18:54:02 2012
@@ -71,5 +71,5 @@
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}}
}
More information about the cfe-commits
mailing list