Quote the user provided string in the warning message and update
authorEric Christopher <echristo@gmail.com>
Fri, 12 Jun 2015 20:13:50 +0000 (20:13 +0000)
committerEric Christopher <echristo@gmail.com>
Fri, 12 Jun 2015 20:13:50 +0000 (20:13 +0000)
tests accordingly.

llvm-svn: 239635

clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/test/Sema/attr-target.c

index 0852010..8927a74 100644 (file)
@@ -1975,7 +1975,7 @@ def err_attribute_invalid_vector_type : Error<"invalid vector element type %0">;
 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">;
index f8b0665..6c6b461 100644 (file)
@@ -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}}