summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaOpenCL/printf-format-strings.cl
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2019-01-29 20:49:47 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2019-01-29 20:49:47 +0000
commit297afb14ec82180021aa1b2f02abd3c8c5e4c475 (patch)
treec4c57a0d86f5179aa9d1637198f2c49d4b184fb9 /clang/test/SemaOpenCL/printf-format-strings.cl
parent46575176e9642e9f8567e75e05a98867396803cc (diff)
downloadbcm5719-llvm-297afb14ec82180021aa1b2f02abd3c8c5e4c475.tar.gz
bcm5719-llvm-297afb14ec82180021aa1b2f02abd3c8c5e4c475.zip
Revert "OpenCL: Extend argument promotion rules to vector types"
This reverts r348083. This was based on a misreading of the spec for printf specifiers. Also revert r343653, as without a subsequent patch, a correctly specified format for a vector will incorrectly warn. Fixes bug 40491. llvm-svn: 352539
Diffstat (limited to 'clang/test/SemaOpenCL/printf-format-strings.cl')
-rw-r--r--clang/test/SemaOpenCL/printf-format-strings.cl4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/SemaOpenCL/printf-format-strings.cl b/clang/test/SemaOpenCL/printf-format-strings.cl
index 079a8349568..212e1f8981c 100644
--- a/clang/test/SemaOpenCL/printf-format-strings.cl
+++ b/clang/test/SemaOpenCL/printf-format-strings.cl
@@ -13,10 +13,10 @@ int printf(__constant const char* st, ...) __attribute__((format(printf, 1, 2)))
kernel void format_v4f32(float4 arg)
{
#ifdef cl_khr_fp64
- printf("%v4f\n", arg);
+ printf("%v4f\n", arg); // expected-warning{{format specifies type 'double __attribute__((ext_vector_type(4)))' but the argument has type 'float4' (vector of 4 'float' values)}}
// Precision modifier
- printf("%.2v4f\n", arg);
+ printf("%.2v4f\n", arg); // expected-warning{{format specifies type 'double __attribute__((ext_vector_type(4)))' but the argument has type 'float4' (vector of 4 'float' values)}}
#else
// FIXME: These should not warn, and the type should be expected to be float.
printf("%v4f\n", arg); // expected-warning {{double __attribute__((ext_vector_type(4)))' but the argument has type 'float4' (vector of 4 'float' values)}}
OpenPOWER on IntegriCloud