summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser
diff options
context:
space:
mode:
authorAnastasia Stulova <anastasia.stulova@arm.com>2019-12-27 13:38:48 +0000
committerAnastasia Stulova <anastasia.stulova@arm.com>2019-12-27 13:42:07 +0000
commit869d17d851ba08fc35ade3d1077b4986de401e89 (patch)
treea76c2cf4dbf488d0f493b0324692fc9acc484acb /clang/test/Parser
parente25e3d75850113b90314606207b092c5bd707c4f (diff)
downloadbcm5719-llvm-869d17d851ba08fc35ade3d1077b4986de401e89.tar.gz
bcm5719-llvm-869d17d851ba08fc35ade3d1077b4986de401e89.zip
[OpenCL] Pretty print __private addr space
Add printing of __private address space to TypePrinter to allow it appears in diagnostics and AST dumps as all other language addr spaces. Tags: #clang Differential Revision: https://reviews.llvm.org/D71272
Diffstat (limited to 'clang/test/Parser')
-rw-r--r--clang/test/Parser/opencl-astype.cl2
-rw-r--r--clang/test/Parser/opencl-atomics-cl20.cl6
2 files changed, 4 insertions, 4 deletions
diff --git a/clang/test/Parser/opencl-astype.cl b/clang/test/Parser/opencl-astype.cl
index 903c42ee8c1..4a26fb635dd 100644
--- a/clang/test/Parser/opencl-astype.cl
+++ b/clang/test/Parser/opencl-astype.cl
@@ -11,7 +11,7 @@ void test_astype() {
typedef __attribute__(( ext_vector_type(4) )) double double4;
float4 f4;
- double4 d4 = __builtin_astype(f4, double4); // expected-error{{invalid reinterpretation: sizes of 'double4' (vector of 4 'double' values) and 'float4' (vector of 4 'float' values) must match}}
+ double4 d4 = __builtin_astype(f4, double4); // expected-error{{invalid reinterpretation: sizes of 'double4' (vector of 4 'double' values) and '__private float4' (vector of 4 'float' values) must match}}
// Verify int4->float3, float3->int4 works.
int4 i4;
diff --git a/clang/test/Parser/opencl-atomics-cl20.cl b/clang/test/Parser/opencl-atomics-cl20.cl
index ad67db0bab8..844902e847f 100644
--- a/clang/test/Parser/opencl-atomics-cl20.cl
+++ b/clang/test/Parser/opencl-atomics-cl20.cl
@@ -66,9 +66,9 @@ void atomic_ops_test() {
atomic_int i;
foo(&i);
// OpenCL v2.0 s6.13.11.8, arithemtic operations are not permitted on atomic types.
- i++; // expected-error {{invalid argument type 'atomic_int' (aka '_Atomic(int)') to unary expression}}
+ i++; // expected-error {{invalid argument type '__private atomic_int' (aka '__private _Atomic(int)') to unary expression}}
i = 1; // expected-error {{atomic variable can be assigned to a variable only in global address space}}
- i += 1; // expected-error {{invalid operands to binary expression ('atomic_int' (aka '_Atomic(int)') and 'int')}}
- i = i + i; // expected-error {{invalid operands to binary expression ('atomic_int' (aka '_Atomic(int)') and 'atomic_int')}}
+ i += 1; // expected-error {{invalid operands to binary expression ('__private atomic_int' (aka '__private _Atomic(int)') and 'int')}}
+ i = i + i; // expected-error {{invalid operands to binary expression ('__private atomic_int' (aka '__private _Atomic(int)') and '__private atomic_int')}}
}
#endif
OpenPOWER on IntegriCloud