diff options
author | Artem Belevich <tra@google.com> | 2018-04-04 20:48:42 +0000 |
---|---|---|
committer | Artem Belevich <tra@google.com> | 2018-04-04 20:48:42 +0000 |
commit | 67d22c8a84d60ef9dd92ea0294fdfbec68093ca5 (patch) | |
tree | 8d40037d671e8d71174e96d41e59c5247e1e6e02 /clang/test/SemaCUDA | |
parent | 1f1a7a719d9ead1baa9bc38398cae166a0a30b2e (diff) | |
download | bcm5719-llvm-67d22c8a84d60ef9dd92ea0294fdfbec68093ca5.tar.gz bcm5719-llvm-67d22c8a84d60ef9dd92ea0294fdfbec68093ca5.zip |
Revert "[CUDA] Check initializers of instantiated template variables."
This (temporarily) reverts commit r329127 due to the problems
it exposed in TensorFlow.
llvm-svn: 329229
Diffstat (limited to 'clang/test/SemaCUDA')
-rw-r--r-- | clang/test/SemaCUDA/device-var-init.cu | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/clang/test/SemaCUDA/device-var-init.cu b/clang/test/SemaCUDA/device-var-init.cu index 46cb90da2ec..71f2352843b 100644 --- a/clang/test/SemaCUDA/device-var-init.cu +++ b/clang/test/SemaCUDA/device-var-init.cu @@ -225,20 +225,3 @@ inline __host__ __device__ void hd_emitted_host_only() { static int x = 42; // no error on device because this is never codegen'ed there. } void call_hd_emitted_host_only() { hd_emitted_host_only(); } - -// Verify that we also check field initializers in instantiated structs. -struct NontrivialInitializer { - __host__ __device__ NontrivialInitializer() : x(43) {} - int x; -}; - -template <typename T> -__global__ void bar() { - __shared__ T bad; -// expected-error@-1 {{initialization is not supported for __shared__ variables.}} -} - -void instantiate() { - bar<NontrivialInitializer><<<1, 1>>>(); -// expected-note@-1 {{in instantiation of function template specialization 'bar<NontrivialInitializer>' requested here}} -} |