r195095 - Rename an extension warning to ext_...
Richard Smith
richard-llvm at metafoo.co.uk
Mon Nov 18 19:41:32 PST 2013
Author: rsmith
Date: Mon Nov 18 21:41:32 2013
New Revision: 195095
URL: http://llvm.org/viewvc/llvm-project?rev=195095&view=rev
Log:
Rename an extension warning to ext_...
Modified:
cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
cfe/trunk/lib/Sema/SemaInit.cpp
cfe/trunk/test/Misc/warning-flags.c
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=195095&r1=195094&r2=195095&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Mon Nov 18 21:41:32 2013
@@ -3775,7 +3775,7 @@ def warn_missing_field_initializers : Wa
InGroup<MissingFieldInitializers>, DefaultIgnore;
def warn_braces_around_scalar_init : Warning<
"braces around scalar initializer">;
-def warn_many_braces_around_scalar_init : ExtWarn<
+def ext_many_braces_around_scalar_init : ExtWarn<
"too many braces around scalar initializer">;
def ext_complex_component_init : Extension<
"complex initialization specifying real and imaginary components "
Modified: cfe/trunk/lib/Sema/SemaInit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaInit.cpp?rev=195095&r1=195094&r2=195095&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaInit.cpp (original)
+++ cfe/trunk/lib/Sema/SemaInit.cpp Mon Nov 18 21:41:32 2013
@@ -1005,9 +1005,11 @@ void InitListChecker::CheckScalarType(co
Expr *expr = IList->getInit(Index);
if (InitListExpr *SubIList = dyn_cast<InitListExpr>(expr)) {
+ // FIXME: This is invalid, and accepting it causes overload resolution
+ // to pick the wrong overload in some corner cases.
if (!VerifyOnly)
SemaRef.Diag(SubIList->getLocStart(),
- diag::warn_many_braces_around_scalar_init)
+ diag::ext_many_braces_around_scalar_init)
<< SubIList->getSourceRange();
CheckScalarType(Entity, SubIList, DeclType, Index, StructuredList,
Modified: cfe/trunk/test/Misc/warning-flags.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/warning-flags.c?rev=195095&r1=195094&r2=195095&view=diff
==============================================================================
--- cfe/trunk/test/Misc/warning-flags.c (original)
+++ cfe/trunk/test/Misc/warning-flags.c Mon Nov 18 21:41:32 2013
@@ -23,6 +23,7 @@ CHECK-NEXT: ext_delete_void_ptr_operan
CHECK-NEXT: ext_expected_semi_decl_list
CHECK-NEXT: ext_explicit_specialization_storage_class
CHECK-NEXT: ext_implicit_lib_function_decl
+CHECK-NEXT: ext_many_braces_around_scalar_init
CHECK-NEXT: ext_missing_declspec
CHECK-NEXT: ext_missing_whitespace_after_macro_name
CHECK-NEXT: ext_new_paren_array_nonconst
@@ -87,7 +88,6 @@ CHECK-NEXT: warn_initializer_string_fo
CHECK-NEXT: warn_inline_namespace_reopened_noninline
CHECK-NEXT: warn_integer_too_large_for_signed
CHECK-NEXT: warn_invalid_asm_cast_lvalue
-CHECK-NEXT: warn_many_braces_around_scalar_init
CHECK-NEXT: warn_maynot_respond
CHECK-NEXT: warn_method_param_redefinition
CHECK-NEXT: warn_mismatched_exception_spec
More information about the cfe-commits
mailing list