aboutsummaryrefslogtreecommitdiff
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Sema/internal_linkage.c2
-rw-r--r--clang/test/SemaOpenCL/address-spaces.cl3
2 files changed, 3 insertions, 2 deletions
diff --git a/clang/test/Sema/internal_linkage.c b/clang/test/Sema/internal_linkage.c
index a1bff73..4ea8599 100644
--- a/clang/test/Sema/internal_linkage.c
+++ b/clang/test/Sema/internal_linkage.c
@@ -20,7 +20,7 @@ struct __attribute__((internal_linkage)) S { // expected-warning{{'internal_link
__attribute__((internal_linkage("foo"))) int g(void) {} // expected-error{{'internal_linkage' attribute takes no arguments}}
int var6 [[clang::internal_linkage]];
-int var7 [[clang::internal_linkage]] __attribute__((common)); // expected-error{{'clang::internal_linkage' and 'common' attributes are not compatible}} \
+int var7 [[clang::internal_linkage]] __attribute__((common)); // expected-error{{'common' and 'clang::internal_linkage' attributes are not compatible}} \
// expected-note{{conflicting attribute is here}}
__attribute__((common)) int var8 [[clang::internal_linkage]]; // expected-error{{'clang::internal_linkage' and 'common' attributes are not compatible}} \
// expected-note{{conflicting attribute is here}}
diff --git a/clang/test/SemaOpenCL/address-spaces.cl b/clang/test/SemaOpenCL/address-spaces.cl
index 86435b7..6c3ee89 100644
--- a/clang/test/SemaOpenCL/address-spaces.cl
+++ b/clang/test/SemaOpenCL/address-spaces.cl
@@ -265,7 +265,8 @@ void func_multiple_addr2(void) {
__attribute__((opencl_private)) private_int_t var5; // expected-warning {{multiple identical address spaces specified for type}}
__attribute__((opencl_private)) private_int_t *var6; // expected-warning {{multiple identical address spaces specified for type}}
#if __OPENCL_CPP_VERSION__
- __global int [[clang::opencl_private]] var7; // expected-error {{multiple address spaces specified for type}}
+ __global int [[clang::opencl_private]] var7; // expected-error {{multiple address spaces specified for type}} \
+ // expected-error {{function scope variable cannot be declared in global address space}}
__global int [[clang::opencl_private]] *var8; // expected-error {{multiple address spaces specified for type}}
private_int_t [[clang::opencl_private]] var9; // expected-warning {{multiple identical address spaces specified for type}}
private_int_t [[clang::opencl_private]] *var10; // expected-warning {{multiple identical address spaces specified for type}}