From: Eric Christopher Date: Fri, 12 Jun 2015 20:13:50 +0000 (+0000) Subject: Quote the user provided string in the warning message and update X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3cdc63e45e28c1ddc44ebd47ee70bbe62184b3f6;p=clang Quote the user provided string in the warning message and update tests accordingly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239635 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 08520107e9..8927a742dc 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -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; def err_attribute_unsupported : Error<"%0 attribute is not supported for this target">; diff --git a/test/Sema/attr-target.c b/test/Sema/attr-target.c index f8b0665dcc..6c6b461904 100644 --- a/test/Sema/attr-target.c +++ b/test/Sema/attr-target.c @@ -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}}