[CUDA] Report "unsupported VLA" errors only on device side.
authorArtem Belevich <tra@google.com>
Tue, 28 Nov 2017 18:51:42 +0000 (18:51 +0000)
committerArtem Belevich <tra@google.com>
Tue, 28 Nov 2017 18:51:42 +0000 (18:51 +0000)
commit50e6e545872366dc68e005320564a67a68ecdc33
treebc10c5eb63cbb1487730f506925081b2271126e3
parentbba7f862d8ab3f97372969856e376a0e4b636227
[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/lib/Sema/SemaType.cpp
clang/test/SemaCUDA/call-stack-for-deferred-err.cu
clang/test/SemaCUDA/no-call-stack-for-immediate-errs.cu
clang/test/SemaCUDA/vla.cu