]> granicus.if.org Git - clang/commitdiff
Put ext_offsetof_extended_field_designator under the warning flag
authorDouglas Gregor <dgregor@apple.com>
Wed, 9 Nov 2011 03:01:42 +0000 (03:01 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 9 Nov 2011 03:01:42 +0000 (03:01 +0000)
-Wextended-offsetof, from Jeff Walden!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144160 91177308-0d34-0410-b5e6-96231b3b80d8

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

index e976470b2ce5c411db01fc3454f0b307ba6f9939..d8b35390fe20ec0b563223e3a55f0679a7224192 100644 (file)
@@ -3256,7 +3256,8 @@ def err_offsetof_record_type : Error<
   "offsetof requires struct, union, or class type, %0 invalid">;
 def err_offsetof_array_type : Error<"offsetof requires array type, %0 invalid">;
 def ext_offsetof_extended_field_designator : Extension<
-  "using extended field designator is an extension">;
+  "using extended field designator is an extension">,
+  InGroup<DiagGroup<"extended-offsetof">>;
 def warn_offsetof_non_pod_type : ExtWarn<"offset of on non-POD type %0">,
   InGroup<InvalidOffsetof>;
 def err_offsetof_bitfield : Error<"cannot compute offset of bit-field %0">;
index 9fc48325543fe68ad7fd6fbe1337791c8293c4b0..eb74df87dfdc2b8e33a70ce7b6bc0b4d494c4284 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 (279):
+CHECK: Warnings without flags (278):
 CHECK-NEXT:   ext_anon_param_requires_type_specifier
 CHECK-NEXT:   ext_anonymous_struct_union_qualified
 CHECK-NEXT:   ext_array_init_copy
@@ -56,7 +56,6 @@ CHECK-NEXT:   ext_missing_varargs_arg
 CHECK-NEXT:   ext_missing_whitespace_after_macro_name
 CHECK-NEXT:   ext_new_paren_array_nonconst
 CHECK-NEXT:   ext_nonstandard_escape
-CHECK-NEXT:   ext_offsetof_extended_field_designator
 CHECK-NEXT:   ext_param_not_declared
 CHECK-NEXT:   ext_param_promoted_not_compatible_with_prototype
 CHECK-NEXT:   ext_paste_comma