From aa370bd0d77c136bc6ba87c7b20d007a53e82602 Mon Sep 17 00:00:00 2001 From: Justin Lebar Date: Thu, 13 Oct 2016 18:45:13 +0000 Subject: [CUDA] Disallow __shared__ variables in host functions. Reviewers: tra, rnk Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25143 llvm-svn: 284144 --- clang/include/clang/Basic/DiagnosticSemaKinds.td | 3 +++ 1 file changed, 3 insertions(+) (limited to 'clang/include') diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index ff7b3422a94..58029b03039 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -6747,6 +6747,9 @@ def err_cuda_vla : Error< "cannot use variable-length arrays in " "%select{__device__|__global__|__host__|__host__ __device__}0 functions">; def err_cuda_extern_shared : Error<"__shared__ variable %0 cannot be 'extern'">; +def err_cuda_host_shared : Error< + "__shared__ local variables not allowed in " + "%select{__device__|__global__|__host__|__host__ __device__}0 functions">; def err_cuda_nonglobal_constant : Error<"__constant__ variables must be global">; def warn_non_pod_vararg_with_format_string : Warning< -- cgit v1.2.3