From 50e6e545872366dc68e005320564a67a68ecdc33 Mon Sep 17 00:00:00 2001 From: Artem Belevich Date: Tue, 28 Nov 2017 18:51:42 +0000 Subject: [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 llvm-svn: 319201 --- clang/test/SemaCUDA/call-stack-for-deferred-err.cu | 2 +- clang/test/SemaCUDA/no-call-stack-for-immediate-errs.cu | 2 +- clang/test/SemaCUDA/vla.cu | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'clang/test') diff --git a/clang/test/SemaCUDA/call-stack-for-deferred-err.cu b/clang/test/SemaCUDA/call-stack-for-deferred-err.cu index ddcaabf4ef5..35f71dd0f12 100644 --- a/clang/test/SemaCUDA/call-stack-for-deferred-err.cu +++ b/clang/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/clang/test/SemaCUDA/no-call-stack-for-immediate-errs.cu b/clang/test/SemaCUDA/no-call-stack-for-immediate-errs.cu index 6dc98695c1e..f7e9eb7e921 100644 --- a/clang/test/SemaCUDA/no-call-stack-for-immediate-errs.cu +++ b/clang/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/clang/test/SemaCUDA/vla.cu b/clang/test/SemaCUDA/vla.cu index f0d1ba595d9..b65ae5e5fe2 100644 --- a/clang/test/SemaCUDA/vla.cu +++ b/clang/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" -- cgit v1.2.3