]> granicus.if.org Git - clang/commitdiff
[CUDA] Don't specify exact line numbers in cuda-builtin-vars.cu.
authorJustin Lebar <jlebar@google.com>
Wed, 24 Feb 2016 21:49:30 +0000 (21:49 +0000)
committerJustin Lebar <jlebar@google.com>
Wed, 24 Feb 2016 21:49:30 +0000 (21:49 +0000)
This makes the test less fragile to changes to cuda_builtin_vars.h.

Test-only change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261775 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaCUDA/cuda-builtin-vars.cu

index 97c5111cebdc6658f872bfc3a18f50b864f856fe..108e75cae766796c651e4d9f2aa1648f47c59035 100644 (file)
@@ -34,20 +34,20 @@ void kernel(int *out) {
 
   out[i++] = warpSize;
   warpSize = 0; // expected-error {{cannot assign to variable 'warpSize' with const-qualified type 'const int'}}
-  // expected-note@cuda_builtin_vars.h:104 {{variable 'warpSize' declared const here}}
+  // expected-note@cuda_builtin_vars.h:* {{variable 'warpSize' declared const here}}
 
   // Make sure we can't construct or assign to the special variables.
   __cuda_builtin_threadIdx_t x; // expected-error {{calling a private constructor of class '__cuda_builtin_threadIdx_t'}}
-  // expected-note@cuda_builtin_vars.h:67 {{declared private here}}
+  // expected-note@cuda_builtin_vars.h:* {{declared private here}}
 
   __cuda_builtin_threadIdx_t y = threadIdx; // expected-error {{calling a private constructor of class '__cuda_builtin_threadIdx_t'}}
-  // expected-note@cuda_builtin_vars.h:67 {{declared private here}}
+  // expected-note@cuda_builtin_vars.h:* {{declared private here}}
 
   threadIdx = threadIdx; // expected-error {{'operator=' is a private member of '__cuda_builtin_threadIdx_t'}}
-  // expected-note@cuda_builtin_vars.h:67 {{declared private here}}
+  // expected-note@cuda_builtin_vars.h:* {{declared private here}}
 
   void *ptr = &threadIdx; // expected-error {{'operator&' is a private member of '__cuda_builtin_threadIdx_t'}}
-  // expected-note@cuda_builtin_vars.h:67 {{declared private here}}
+  // expected-note@cuda_builtin_vars.h:* {{declared private here}}
 
   // Following line should've caused an error as one is not allowed to
   // take address of a built-in variable in CUDA. Alas there's no way