[cfe-commits] r152886 - in /cfe/trunk: include/clang/Basic/DiagnosticLexKinds.td test/Misc/warning-flags.c

Ted Kremenek kremenek at apple.com
Thu Mar 15 18:03:41 PDT 2012


Author: kremenek
Date: Thu Mar 15 20:03:40 2012
New Revision: 152886

URL: http://llvm.org/viewvc/llvm-project?rev=152886&view=rev
Log:
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.

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=152886&r1=152885&r2=152886&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td Thu Mar 15 20:03:40 2012
@@ -226,7 +226,8 @@
 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">;

Modified: cfe/trunk/test/Misc/warning-flags.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/warning-flags.c?rev=152886&r1=152885&r2=152886&view=diff
==============================================================================
--- cfe/trunk/test/Misc/warning-flags.c (original)
+++ cfe/trunk/test/Misc/warning-flags.c Thu Mar 15 20:03:40 2012
@@ -17,7 +17,7 @@
 
 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_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





More information about the cfe-commits mailing list