[PATCH] D15305: [CUDA] Do not allow dynamic initialization of global device side variables.
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 14 11:51:15 PST 2016
rsmith added a comment.
I think you missed this from my previous review:
> This should be checked and diagnosed in Sema, not in CodeGen.
================
Comment at: lib/CodeGen/CGDeclCXX.cpp:333-337
@@ +332,7 @@
+ [](const CXXMethodDecl *Method) { return Method->isVirtual(); }))
+ return false;
+
+ // .. and no virtual base classes.
+ if (RD->getNumVBases() != 0)
+ return false;
+
----------------
You can check these conditions with `RD->isDynamicClass()`.
http://reviews.llvm.org/D15305
More information about the cfe-commits
mailing list