Hi llvm team!
This patch adds support of -Wno-extension-used to make it possible to
suppress the warning:
lala.c:1:21: warning: extension used [-pedantic]
double lala(double) asm("llvm.log.f64");
r140770 has started to promote this warning to error if -Werror is
specified (which is absolutely correct).
We have a test that checks some llvm intrinsics and it's not Clangy to
drop -Werror just because one particular warning is expected.
I have added the option to suppress this warning and has removed it
from the test for warnings w/o suppression options.
OK to commit?
krasin
Index: test/Misc/warning-flags.c
===================================================================
--- test/Misc/warning-flags.c (revision 141096)
+++ test/Misc/warning-flags.c (working copy)
@@ -17,7 +17,7 @@
The list of warnings below should NEVER grow. It should gradually shrink to 0.
-CHECK: Warnings without flags (301):
+CHECK: Warnings without flags (300):
CHECK-NEXT: backslash_newline_space
CHECK-NEXT: charize_microsoft_ext
CHECK-NEXT: ext_anon_param_requires_type_specifier
@@ -85,7 +85,6 @@
CHECK-NEXT: ext_subscript_non_lvalue
CHECK-NEXT: ext_template_arg_extra_parens
CHECK-NEXT: ext_thread_before
-CHECK-NEXT: ext_token_used
CHECK-NEXT: ext_top_level_semi
CHECK-NEXT: ext_typecheck_addrof_void
CHECK-NEXT: ext_typecheck_cast_nonscalar
Index: include/clang/Basic/DiagnosticLexKinds.td
===================================================================
--- include/clang/Basic/DiagnosticLexKinds.td (revision 141096)
+++ include/clang/Basic/DiagnosticLexKinds.td (working copy)
@@ -43,7 +43,8 @@
def ext_dollar_in_identifier : Extension<"'$' in identifier">;
def charize_microsoft_ext : Extension<"@# is a microsoft extension">;
-def ext_token_used : Extension<"extension used">;
+def ext_token_used : Extension<"extension used">,
+ InGroup<DiagGroup<"extension-used">>;
def warn_unterminated_string : ExtWarn<"missing terminating '\"' character">;
def warn_unterminated_char : ExtWarn<"missing terminating ' character">;
Index: lib/Driver/Tools.cpp
===================================================================
--- lib/Driver/Tools.cpp (revision 141096)
+++ lib/Driver/Tools.cpp (working copy)
@@ -2628,6 +2628,7 @@
.Case("dynamic-class-memaccess", true)
.Case("enum-compare", true)
.Case("exit-time-destructors", true)
+ .Case("extension-used", true)
.Case("gnu", true)
.Case("gnu-designator", true)
.Case("header-hygiene", true)
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits