From 3cdc63e45e28c1ddc44ebd47ee70bbe62184b3f6 Mon Sep 17 00:00:00 2001 From: Eric Christopher <echristo@gmail.com> Date: Fri, 12 Jun 2015 20:13:50 +0000 Subject: [PATCH] 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 --- include/clang/Basic/DiagnosticSemaKinds.td | 2 +- test/Sema/attr-target.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 08520107e91..8927a742dc2 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<IgnoredAttributes>; 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 f8b0665dcc3..6c6b461904d 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}} -- GitLab