From: Douglas Gregor Date: Wed, 9 Nov 2011 03:01:42 +0000 (+0000) Subject: Put ext_offsetof_extended_field_designator under the warning flag X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b31dd8ff34903507cec1b057955f2a272ad2ee65;p=clang Put ext_offsetof_extended_field_designator under the warning flag -Wextended-offsetof, from Jeff Walden! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144160 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index e976470b2c..d8b35390fe 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -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>; def warn_offsetof_non_pod_type : ExtWarn<"offset of on non-POD type %0">, InGroup; def err_offsetof_bitfield : Error<"cannot compute offset of bit-field %0">; diff --git a/test/Misc/warning-flags.c b/test/Misc/warning-flags.c index 9fc4832554..eb74df87df 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 (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