aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2011-12-16 20:58:01 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2011-12-16 20:58:01 +0000
commit80d39bf55f962278867f54696a033f1aa546d5a0 (patch)
tree1eb395b7143f7b176e39ea837465666ae0558923
parent25b009a9d2a79929112d3c28c7dd1730bf5246c8 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146755 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Basic/DiagnosticLexKinds.td3
-rw-r--r--test/Misc/warning-flags.c3
2 files changed, 3 insertions, 3 deletions
diff --git a/include/clang/Basic/DiagnosticLexKinds.td b/include/clang/Basic/DiagnosticLexKinds.td
index cbaa407d3f..deb6af88b3 100644
--- a/include/clang/Basic/DiagnosticLexKinds.td
+++ b/include/clang/Basic/DiagnosticLexKinds.td
@@ -203,7 +203,8 @@ def warn_cxx98_compat_variadic_macro : Warning<
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<
diff --git a/test/Misc/warning-flags.c b/test/Misc/warning-flags.c
index d384bb5d53..dd20fe5b2f 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 (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
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