]> granicus.if.org Git - clang/commitdiff
Add warning flag for '#import is a language extension', -W#import-pedantic.
authorTed Kremenek <kremenek@apple.com>
Fri, 16 Mar 2012 01:03:40 +0000 (01:03 +0000)
committerTed Kremenek <kremenek@apple.com>
Fri, 16 Mar 2012 01:03:40 +0000 (01:03 +0000)
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

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

index 9f23ff52d3b3263c78021f66b41d21f39030cbac..8d3a0e78c38ebd42e99a049825e95ae1f1e01499 100644 (file)
@@ -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">;
index 854ba3f98396e1e2f0572c433d5bbc532207fe4a..bc0c941bd99d1e05bc0d1fdc5f8626dd2cad7ffd 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 (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