aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2012-03-16 01:03:40 +0000
committerTed Kremenek <kremenek@apple.com>2012-03-16 01:03:40 +0000
commit9ace587fe52a955cf575d8662d8b86b3b084d44b (patch)
treec45c474e5ab9efb95a6dbd822b93c64174d07c9a
parent19ebac118fbdb6758d4e55be246d72945b8d21b1 (diff)
Add warning flag for '#import is a language extension', -W#import-pedantic.
Don't know if it is an anathema to include '#' in the warning name. I'm fine with changing it, but this was the most obvious name. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152886 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 9f23ff52d3..8d3a0e78c3 100644
--- a/include/clang/Basic/DiagnosticLexKinds.td
+++ b/include/clang/Basic/DiagnosticLexKinds.td
@@ -226,7 +226,8 @@ def warn_pp_convert_lhs_to_positive : Warning<
def warn_pp_convert_rhs_to_positive : Warning<
"right side of operator converted from negative value to unsigned: %0">;
-def ext_pp_import_directive : Extension<"#import is a language extension">;
+def ext_pp_import_directive : Extension<"#import is a language extension">,
+ InGroup<DiagGroup<"#import-pedantic">>;
def ext_pp_ident_directive : Extension<"#ident is a language extension">;
def ext_pp_include_next_directive : Extension<
"#include_next is a language extension">;
diff --git a/test/Misc/warning-flags.c b/test/Misc/warning-flags.c
index 854ba3f983..bc0c941bd9 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 (254):
+CHECK: Warnings without flags (253):
CHECK-NEXT: ext_anonymous_struct_union_qualified
CHECK-NEXT: ext_binary_literal
CHECK-NEXT: ext_cast_fn_obj
@@ -57,7 +57,6 @@ CHECK-NEXT: ext_plain_complex
CHECK-NEXT: ext_pp_bad_vaargs_use
CHECK-NEXT: ext_pp_comma_expr
CHECK-NEXT: ext_pp_ident_directive
-CHECK-NEXT: ext_pp_import_directive
CHECK-NEXT: ext_pp_include_next_directive
CHECK-NEXT: ext_pp_line_too_big
CHECK-NEXT: ext_pp_macro_redef