diff options
author | Justin Lebar <jlebar@google.com> | 2016-10-21 20:50:47 +0000 |
---|---|---|
committer | Justin Lebar <jlebar@google.com> | 2016-10-21 20:50:47 +0000 |
commit | 4d38a5cf740f3f418ad6e5b0ea88b6cf8cc35acd (patch) | |
tree | 40255341511ebb1f7f1521d42d06233b1399f2ac /clang | |
parent | abd1a6e687b7d4b332dc2fa35526a6e8de5f3857 (diff) | |
download | bcm5719-llvm-4d38a5cf740f3f418ad6e5b0ea88b6cf8cc35acd.tar.gz bcm5719-llvm-4d38a5cf740f3f418ad6e5b0ea88b6cf8cc35acd.zip |
[CUDA] Simplify some repeated diagnostic expectations in CUDA tests.
Instead of repeating the diagnostic, use "expected-note N".
Test-only change.
llvm-svn: 284882
Diffstat (limited to 'clang')
-rw-r--r-- | clang/test/SemaCUDA/bad-calls-on-same-line.cu | 3 | ||||
-rw-r--r-- | clang/test/SemaCUDA/call-device-fn-from-host.cu | 9 | ||||
-rw-r--r-- | clang/test/SemaCUDA/call-host-fn-from-device.cu | 11 | ||||
-rw-r--r-- | clang/test/SemaCUDA/trace-through-global.cu | 6 |
4 files changed, 7 insertions, 22 deletions
diff --git a/clang/test/SemaCUDA/bad-calls-on-same-line.cu b/clang/test/SemaCUDA/bad-calls-on-same-line.cu index 53d5e128234..67923323a94 100644 --- a/clang/test/SemaCUDA/bad-calls-on-same-line.cu +++ b/clang/test/SemaCUDA/bad-calls-on-same-line.cu @@ -28,8 +28,7 @@ struct Selector<double> { template <typename T> inline __host__ __device__ void hd() { Selector<T>().f(); - // expected-error@-1 {{reference to __device__ function}} - // expected-error@-2 {{reference to __device__ function}} + // expected-error@-1 2 {{reference to __device__ function}} } void host_fn() { diff --git a/clang/test/SemaCUDA/call-device-fn-from-host.cu b/clang/test/SemaCUDA/call-device-fn-from-host.cu index dc227226101..3ea013f3a74 100644 --- a/clang/test/SemaCUDA/call-device-fn-from-host.cu +++ b/clang/test/SemaCUDA/call-device-fn-from-host.cu @@ -7,16 +7,11 @@ #include "Inputs/cuda.h" __device__ void device_fn() {} -// expected-note@-1 {{'device_fn' declared here}} -// expected-note@-2 {{'device_fn' declared here}} -// expected-note@-3 {{'device_fn' declared here}} -// expected-note@-4 {{'device_fn' declared here}} -// expected-note@-5 {{'device_fn' declared here}} +// expected-note@-1 5 {{'device_fn' declared here}} struct S { __device__ S() {} - // expected-note@-1 {{'S' declared here}} - // expected-note@-2 {{'S' declared here}} + // expected-note@-1 2 {{'S' declared here}} __device__ ~S() { device_fn(); } // expected-note@-1 {{'~S' declared here}} int x; diff --git a/clang/test/SemaCUDA/call-host-fn-from-device.cu b/clang/test/SemaCUDA/call-host-fn-from-device.cu index d484af14172..c727dc8cbeb 100644 --- a/clang/test/SemaCUDA/call-host-fn-from-device.cu +++ b/clang/test/SemaCUDA/call-host-fn-from-device.cu @@ -7,20 +7,13 @@ #include "Inputs/cuda.h" extern "C" void host_fn() {} -// expected-note@-1 {{'host_fn' declared here}} -// expected-note@-2 {{'host_fn' declared here}} -// expected-note@-3 {{'host_fn' declared here}} -// expected-note@-4 {{'host_fn' declared here}} -// expected-note@-5 {{'host_fn' declared here}} -// expected-note@-6 {{'host_fn' declared here}} -// expected-note@-7 {{'host_fn' declared here}} +// expected-note@-1 7 {{'host_fn' declared here}} struct Dummy {}; struct S { S() {} - // expected-note@-1 {{'S' declared here}} - // expected-note@-2 {{'S' declared here}} + // expected-note@-1 2 {{'S' declared here}} ~S() { host_fn(); } // expected-note@-1 {{'~S' declared here}} int x; diff --git a/clang/test/SemaCUDA/trace-through-global.cu b/clang/test/SemaCUDA/trace-through-global.cu index 065342fdd11..f73570fa664 100644 --- a/clang/test/SemaCUDA/trace-through-global.cu +++ b/clang/test/SemaCUDA/trace-through-global.cu @@ -6,8 +6,7 @@ #include "Inputs/cuda.h" __device__ void device_fn(int) {} -// expected-note@-1 {{declared here}} -// expected-note@-2 {{declared here}} +// expected-note@-1 2 {{declared here}} inline __host__ __device__ int hd1() { device_fn(0); // expected-error {{reference to __device__ function}} @@ -45,6 +44,5 @@ void launch_kernel() { void host_fn() { launch_kernel<int>(); - // expected-note@-1 {{called by 'host_fn'}} - // expected-note@-2 {{called by 'host_fn'}} + // expected-note@-1 2 {{called by 'host_fn'}} } |