From 9ace587fe52a955cf575d8662d8b86b3b084d44b Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Fri, 16 Mar 2012 01:03:40 +0000 Subject: [PATCH] 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 --- include/clang/Basic/DiagnosticLexKinds.td | 3 ++- test/Misc/warning-flags.c | 3 +-- 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>; 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 -- 2.40.0