<div dir="ltr">Maybe update the TableGen emitter to signal an error for this?<div><br></div><div>-- Sean Silva</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Nov 18, 2013 at 10:41 PM, Richard Smith <span dir="ltr"><<a href="mailto:richard-llvm@metafoo.co.uk" target="_blank">richard-llvm@metafoo.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: rsmith<br>
Date: Mon Nov 18 21:41:32 2013<br>
New Revision: 195095<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=195095&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=195095&view=rev</a><br>
Log:<br>
Rename an extension warning to ext_...<br>
<br>
Modified:<br>
    cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td<br>
    cfe/trunk/lib/Sema/SemaInit.cpp<br>
    cfe/trunk/test/Misc/warning-flags.c<br>
<br>
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=195095&r1=195094&r2=195095&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=195095&r1=195094&r2=195095&view=diff</a><br>

==============================================================================<br>
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)<br>
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Mon Nov 18 21:41:32 2013<br>
@@ -3775,7 +3775,7 @@ def warn_missing_field_initializers : Wa<br>
   InGroup<MissingFieldInitializers>, DefaultIgnore;<br>
 def warn_braces_around_scalar_init : Warning<<br>
   "braces around scalar initializer">;<br>
-def warn_many_braces_around_scalar_init : ExtWarn<<br>
+def ext_many_braces_around_scalar_init : ExtWarn<<br>
   "too many braces around scalar initializer">;<br>
 def ext_complex_component_init : Extension<<br>
   "complex initialization specifying real and imaginary components "<br>
<br>
Modified: cfe/trunk/lib/Sema/SemaInit.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaInit.cpp?rev=195095&r1=195094&r2=195095&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaInit.cpp?rev=195095&r1=195094&r2=195095&view=diff</a><br>

==============================================================================<br>
--- cfe/trunk/lib/Sema/SemaInit.cpp (original)<br>
+++ cfe/trunk/lib/Sema/SemaInit.cpp Mon Nov 18 21:41:32 2013<br>
@@ -1005,9 +1005,11 @@ void InitListChecker::CheckScalarType(co<br>
<br>
   Expr *expr = IList->getInit(Index);<br>
   if (InitListExpr *SubIList = dyn_cast<InitListExpr>(expr)) {<br>
+    // FIXME: This is invalid, and accepting it causes overload resolution<br>
+    // to pick the wrong overload in some corner cases.<br>
     if (!VerifyOnly)<br>
       SemaRef.Diag(SubIList->getLocStart(),<br>
-                   diag::warn_many_braces_around_scalar_init)<br>
+                   diag::ext_many_braces_around_scalar_init)<br>
         << SubIList->getSourceRange();<br>
<br>
     CheckScalarType(Entity, SubIList, DeclType, Index, StructuredList,<br>
<br>
Modified: cfe/trunk/test/Misc/warning-flags.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/warning-flags.c?rev=195095&r1=195094&r2=195095&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/warning-flags.c?rev=195095&r1=195094&r2=195095&view=diff</a><br>

==============================================================================<br>
--- cfe/trunk/test/Misc/warning-flags.c (original)<br>
+++ cfe/trunk/test/Misc/warning-flags.c Mon Nov 18 21:41:32 2013<br>
@@ -23,6 +23,7 @@ CHECK-NEXT:   ext_delete_void_ptr_operan<br>
 CHECK-NEXT:   ext_expected_semi_decl_list<br>
 CHECK-NEXT:   ext_explicit_specialization_storage_class<br>
 CHECK-NEXT:   ext_implicit_lib_function_decl<br>
+CHECK-NEXT:   ext_many_braces_around_scalar_init<br>
 CHECK-NEXT:   ext_missing_declspec<br>
 CHECK-NEXT:   ext_missing_whitespace_after_macro_name<br>
 CHECK-NEXT:   ext_new_paren_array_nonconst<br>
@@ -87,7 +88,6 @@ CHECK-NEXT:   warn_initializer_string_fo<br>
 CHECK-NEXT:   warn_inline_namespace_reopened_noninline<br>
 CHECK-NEXT:   warn_integer_too_large_for_signed<br>
 CHECK-NEXT:   warn_invalid_asm_cast_lvalue<br>
-CHECK-NEXT:   warn_many_braces_around_scalar_init<br>
 CHECK-NEXT:   warn_maynot_respond<br>
 CHECK-NEXT:   warn_method_param_redefinition<br>
 CHECK-NEXT:   warn_mismatched_exception_spec<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div>