From: Peter Collingbourne Date: Thu, 29 Sep 2011 18:04:12 +0000 (+0000) Subject: Add a warning group for warnings about using C1X features as extensions X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=35f37cd6637f5cb4dbf18a542b501fd40522ba7b;p=clang Add a warning group for warnings about using C1X features as extensions git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140795 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/DiagnosticGroups.td b/include/clang/Basic/DiagnosticGroups.td index 9901b79bec..5a4ebad589 100644 --- a/include/clang/Basic/DiagnosticGroups.td +++ b/include/clang/Basic/DiagnosticGroups.td @@ -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]>; diff --git a/include/clang/Basic/DiagnosticParseKinds.td b/include/clang/Basic/DiagnosticParseKinds.td index 3d577e9319..7b40eee9ea 100644 --- a/include/clang/Basic/DiagnosticParseKinds.td +++ b/include/clang/Basic/DiagnosticParseKinds.td @@ -64,7 +64,7 @@ def ext_ms_enum_fixed_underlying_type : Extension< InGroup; def ext_c1x_generic_selection : Extension< - "generic selections are a C1X-specific feature">; + "generic selections are a C1X-specific feature">, InGroup; 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; /// Objective-C parser diagnostics def err_expected_minus_or_plus : Error< diff --git a/test/Misc/warning-flags.c b/test/Misc/warning-flags.c index 447b8ef02a..6ee27f84fa 100644 --- a/test/Misc/warning-flags.c +++ b/test/Misc/warning-flags.c @@ -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