summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
diff options
context:
space:
mode:
authorArtem Belevich <tra@google.com>2018-04-03 22:41:06 +0000
committerArtem Belevich <tra@google.com>2018-04-03 22:41:06 +0000
commitd9189d1e76dd0d2640b13b5c2aa4cfb47ea7d808 (patch)
treefebc074922b0206fcaeeeaafe4b78168f1a9349d /clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
parent90f13ed0e42b17458bda8b1a350a68c53df9e6be (diff)
downloadbcm5719-llvm-d9189d1e76dd0d2640b13b5c2aa4cfb47ea7d808.tar.gz
bcm5719-llvm-d9189d1e76dd0d2640b13b5c2aa4cfb47ea7d808.zip
[CUDA] Check initializers of instantiated template variables.
We were already performing checks on non-template variables, but the checks on templated ones were missing. Differential Revision: https://reviews.llvm.org/D45231 llvm-svn: 329127
Diffstat (limited to 'clang/lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaTemplateInstantiateDecl.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
index a7883c67b80..709b4a18cb7 100644
--- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -4221,6 +4221,9 @@ void Sema::InstantiateVariableInitializer(
ActOnUninitializedDecl(Var);
}
+
+ if (getLangOpts().CUDA)
+ checkAllowedCUDAInitializer(Var);
}
/// \brief Instantiate the definition of the given variable from its
OpenPOWER on IntegriCloud