[cfe-commits] r146755 - in /cfe/trunk: include/clang/Basic/DiagnosticLexKinds.td test/Misc/warning-flags.c
Richard Smith
richard-llvm at metafoo.co.uk
Fri Dec 16 12:58:02 PST 2011
Author: rsmith
Date: Fri Dec 16 14:58:01 2011
New Revision: 146755
URL: http://llvm.org/viewvc/llvm-project?rev=146755&view=rev
Log:
Add a warning flag for ext_embedded_directive. gcc considers this undefined
behaviour to be an error, so it's useful to be able to make it an error in clang
too.
Modified:
cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td
cfe/trunk/test/Misc/warning-flags.c
Modified: cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td?rev=146755&r1=146754&r2=146755&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td Fri Dec 16 14:58:01 2011
@@ -203,7 +203,8 @@
def ext_named_variadic_macro : Extension<
"named variadic macros are a GNU extension">, InGroup<VariadicMacros>;
def ext_embedded_directive : Extension<
- "embedding a directive within macro arguments is not portable">;
+ "embedding a directive within macro arguments is not portable">,
+ InGroup<DiagGroup<"embedded-directive">>;
def ext_missing_varargs_arg : Extension<
"varargs argument missing, but tolerated as an extension">;
def ext_empty_fnmacro_arg : Extension<
Modified: cfe/trunk/test/Misc/warning-flags.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/warning-flags.c?rev=146755&r1=146754&r2=146755&view=diff
==============================================================================
--- cfe/trunk/test/Misc/warning-flags.c (original)
+++ cfe/trunk/test/Misc/warning-flags.c Fri Dec 16 14:58:01 2011
@@ -17,7 +17,7 @@
The list of warnings below should NEVER grow. It should gradually shrink to 0.
-CHECK: Warnings without flags (271):
+CHECK: Warnings without flags (270):
CHECK-NEXT: ext_anon_param_requires_type_specifier
CHECK-NEXT: ext_anonymous_struct_union_qualified
CHECK-NEXT: ext_array_init_copy
@@ -28,7 +28,6 @@
CHECK-NEXT: ext_designated_init_cxx
CHECK-NEXT: ext_duplicate_declspec
CHECK-NEXT: ext_ellipsis_exception_spec
-CHECK-NEXT: ext_embedded_directive
CHECK-NEXT: ext_empty_fnmacro_arg
CHECK-NEXT: ext_empty_source_file
CHECK-NEXT: ext_enum_friend
More information about the cfe-commits
mailing list