summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCUDA/amdgpu-num-gpr-attr.cu
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2014-12-05 18:03:58 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2014-12-05 18:03:58 +0000
commitb9e9dc5e89cc85e761af8c40254352df6b751a84 (patch)
treef962697d07dedd0bf00515d64e7702d192cf5571 /clang/test/SemaCUDA/amdgpu-num-gpr-attr.cu
parent43cfcbca3f4008db36af4d0683f8a9258a20097f (diff)
downloadbcm5719-llvm-b9e9dc5e89cc85e761af8c40254352df6b751a84.tar.gz
bcm5719-llvm-b9e9dc5e89cc85e761af8c40254352df6b751a84.zip
Workaround attribute ordering issue with kernel only attributes
Placing the attribute after the kernel keyword would incorrectly reject the attribute, so use the smae workaround that other kernel only attributes use. Also add a FIXME because there are two different phrasings now for the same error, althoug amdgpu_num_[sv]gpr uses a consistent one. llvm-svn: 223490
Diffstat (limited to 'clang/test/SemaCUDA/amdgpu-num-gpr-attr.cu')
-rw-r--r--clang/test/SemaCUDA/amdgpu-num-gpr-attr.cu12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/test/SemaCUDA/amdgpu-num-gpr-attr.cu b/clang/test/SemaCUDA/amdgpu-num-gpr-attr.cu
index f6e28454b74..83acbc5007e 100644
--- a/clang/test/SemaCUDA/amdgpu-num-gpr-attr.cu
+++ b/clang/test/SemaCUDA/amdgpu-num-gpr-attr.cu
@@ -2,13 +2,13 @@
#include "Inputs/cuda.h"
-__attribute__((amdgpu_num_vgpr(64))) // expected-error {{'amdgpu_num_vgpr' attribute only applies to kernel functions}}
-__global__ void test_num_vgpr() { }
+__attribute__((amdgpu_num_vgpr(64)))
+__global__ void test_num_vgpr() { } // expected-error {{'amdgpu_num_vgpr' attribute only applies to kernel functions}}
-__attribute__((amdgpu_num_sgpr(32))) // expected-error {{'amdgpu_num_sgpr' attribute only applies to kernel functions}}
-__global__ void test_num_sgpr() { }
+__attribute__((amdgpu_num_sgpr(32)))
+__global__ void test_num_sgpr() { } // expected-error {{'amdgpu_num_sgpr' attribute only applies to kernel functions}}
-// expected-error@+2 {{'amdgpu_num_sgpr' attribute only applies to kernel functions}}
-// expected-error@+1 {{'amdgpu_num_vgpr' attribute only applies to kernel functions}}
+// fixme-expected-error@+3 {{'amdgpu_num_sgpr' attribute only applies to kernel functions}}
+// expected-error@+2 {{'amdgpu_num_vgpr' attribute only applies to kernel functions}}
__attribute__((amdgpu_num_sgpr(32), amdgpu_num_vgpr(64)))
__global__ void test_num_vgpr_num_sgpr() { }
OpenPOWER on IntegriCloud