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.

llvm-svn: 152886
This commit is contained in:
Ted Kremenek 2012-03-16 01:03:40 +00:00
parent 93e6434ca9
commit 519db2ea2b
2 changed files with 3 additions and 3 deletions

View 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">;

View 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