r239635 - Quote the user provided string in the warning message and update
Eric Christopher
echristo at gmail.com
Fri Jun 12 13:13:50 PDT 2015
Author: echristo
Date: Fri Jun 12 15:13:50 2015
New Revision: 239635
URL: http://llvm.org/viewvc/llvm-project?rev=239635&view=rev
Log:
Quote the user provided string in the warning message and update
tests accordingly.
Modified:
cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
cfe/trunk/test/Sema/attr-target.c
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=239635&r1=239634&r2=239635&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Fri Jun 12 15:13:50 2015
@@ -1975,7 +1975,7 @@ def err_attribute_invalid_vector_type :
def err_attribute_bad_neon_vector_size : Error<
"Neon vector size must be 64 or 128 bits">;
def warn_unsupported_target_attribute
- : Warning<"Ignoring unsupported %0 in the target attribute string">,
+ : Warning<"Ignoring unsupported '%0' in the target attribute string">,
InGroup<IgnoredAttributes>;
def err_attribute_unsupported
: Error<"%0 attribute is not supported for this target">;
Modified: cfe/trunk/test/Sema/attr-target.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-target.c?rev=239635&r1=239634&r2=239635&view=diff
==============================================================================
--- cfe/trunk/test/Sema/attr-target.c (original)
+++ cfe/trunk/test/Sema/attr-target.c Fri Jun 12 15:13:50 2015
@@ -2,7 +2,7 @@
int __attribute__((target("avx,sse4.2,arch=ivybridge"))) foo() { return 4; }
int __attribute__((target())) bar() { return 4; } //expected-error {{'target' attribute takes one argument}}
-int __attribute__((target("tune=sandybridge"))) baz() { return 4; } //expected-warning {{Ignoring unsupported tune= in the target attribute string}}
-int __attribute__((target("fpmath=387"))) walrus() { return 4; } //expected-warning {{Ignoring unsupported fpmath= in the target attribute string}}
+int __attribute__((target("tune=sandybridge"))) baz() { return 4; } //expected-warning {{Ignoring unsupported 'tune=' in the target attribute string}}
+int __attribute__((target("fpmath=387"))) walrus() { return 4; } //expected-warning {{Ignoring unsupported 'fpmath=' in the target attribute string}}
More information about the cfe-commits
mailing list