diff options
author | Artem Belevich <tra@google.com> | 2017-11-28 18:51:42 +0000 |
---|---|---|
committer | Artem Belevich <tra@google.com> | 2017-11-28 18:51:42 +0000 |
commit | e9489a2da9a6008eb205dfdbb481f36c12a9c023 (patch) | |
tree | 445437346ec0ef252bbcc4364a4bd70eca891771 /test/SemaCUDA | |
parent | 2581a26fd58a211a37586eb0ae98019433c66969 (diff) | |
download | clang-e9489a2da9a6008eb205dfdbb481f36c12a9c023.tar.gz |
[CUDA] Report "unsupported VLA" errors only on device side.
This fixes erroneously reported CUDA compilation errors
in host-side code during device-side compilation.
I've also restricted OpenMP-specific checks to trigger only
if we're compiling with OpenMP enabled.
Differential Revision: https://reviews.llvm.org/D40275
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319201 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCUDA')
-rw-r--r-- | test/SemaCUDA/call-stack-for-deferred-err.cu | 2 | ||||
-rw-r--r-- | test/SemaCUDA/no-call-stack-for-immediate-errs.cu | 2 | ||||
-rw-r--r-- | test/SemaCUDA/vla.cu | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/test/SemaCUDA/call-stack-for-deferred-err.cu b/test/SemaCUDA/call-stack-for-deferred-err.cu index ddcaabf4ef..35f71dd0f1 100644 --- a/test/SemaCUDA/call-stack-for-deferred-err.cu +++ b/test/SemaCUDA/call-stack-for-deferred-err.cu @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fcuda-is-device -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fcuda-is-device -fsyntax-only -verify %s #include "Inputs/cuda.h" diff --git a/test/SemaCUDA/no-call-stack-for-immediate-errs.cu b/test/SemaCUDA/no-call-stack-for-immediate-errs.cu index 6dc98695c1..f7e9eb7e92 100644 --- a/test/SemaCUDA/no-call-stack-for-immediate-errs.cu +++ b/test/SemaCUDA/no-call-stack-for-immediate-errs.cu @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fcuda-is-device -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fcuda-is-device -fsyntax-only -verify %s #include "Inputs/cuda.h" diff --git a/test/SemaCUDA/vla.cu b/test/SemaCUDA/vla.cu index f0d1ba595d..b65ae5e5fe 100644 --- a/test/SemaCUDA/vla.cu +++ b/test/SemaCUDA/vla.cu @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -fcuda-is-device -fsyntax-only -verify %s -// RUN: %clang_cc1 -fsyntax-only -verify -DHOST %s +// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fcuda-is-device -verify %s +// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -verify -DHOST %s #include "Inputs/cuda.h" |