]> granicus.if.org Git - clang/commitdiff
Add a warning group for warnings about using C1X features as extensions
authorPeter Collingbourne <peter@pcc.me.uk>
Thu, 29 Sep 2011 18:04:12 +0000 (18:04 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Thu, 29 Sep 2011 18:04:12 +0000 (18:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140795 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticParseKinds.td
test/Misc/warning-flags.c

index 9901b79bec2906723c36e22172b2a8599b75afe7..5a4ebad5892d6177d2839f72dc633e1166ea4b39 100644 (file)
@@ -309,6 +309,9 @@ def CXX0x : DiagGroup<"c++0x-extensions", [CXX0xStaticNonIntegralInitializer]>;
 def DelegatingCtorCycles :
   DiagGroup<"delegating-ctor-cycles">;
 
+// A warning group for warnings about using C1X features as extensions.
+def C1X : DiagGroup<"c1x-extensions">;
+
 // A warning group for warnings about GCC extensions.
 def GNU : DiagGroup<"gnu", [GNUDesignator, VLA]>;
 
index 3d577e93192a7c11387ea013a2619168dd0905ec..7b40eee9eaa3e3181dc73d641ab4809c8d0622bd 100644 (file)
@@ -64,7 +64,7 @@ def ext_ms_enum_fixed_underlying_type : Extension<
   InGroup<Microsoft>;
 
 def ext_c1x_generic_selection : Extension<
-  "generic selections are a C1X-specific feature">;
+  "generic selections are a C1X-specific feature">, InGroup<C1X>;
 def err_duplicate_default_assoc : Error<
   "duplicate default generic association">;
 def note_previous_default_assoc : Note<
@@ -259,7 +259,7 @@ def err_unexected_colon_in_nested_name_spec : Error<
 def err_bool_redeclaration : Error<
   "redeclaration of C++ built-in type 'bool'">;
 def ext_c1x_static_assert : Extension<
-  "_Static_assert is a C1X-specific feature">;
+  "_Static_assert is a C1X-specific feature">, InGroup<C1X>;
 
 /// Objective-C parser diagnostics
 def err_expected_minus_or_plus : Error<
index 447b8ef02a8bce8c209e5b907461019d1297292f..6ee27f84fa29b364e870c85cd5ce15d59b67fe69 100644 (file)
@@ -17,7 +17,7 @@ This test serves two purposes:
 
 The list of warnings below should NEVER grow.  It should gradually shrink to 0.
 
-CHECK: Warnings without flags (306):
+CHECK: Warnings without flags (304):
 CHECK-NEXT:   backslash_newline_space
 CHECK-NEXT:   charize_microsoft_ext
 CHECK-NEXT:   ext_anon_param_requires_type_specifier
@@ -25,8 +25,6 @@ CHECK-NEXT:   ext_anonymous_struct_union_qualified
 CHECK-NEXT:   ext_array_init_copy
 CHECK-NEXT:   ext_auto_storage_class
 CHECK-NEXT:   ext_binary_literal
-CHECK-NEXT:   ext_c1x_generic_selection
-CHECK-NEXT:   ext_c1x_static_assert
 CHECK-NEXT:   ext_c99_array_usage
 CHECK-NEXT:   ext_c99_compound_literal
 CHECK-NEXT:   ext_c99_variable_decl_in_for_loop