[PATCH] D15305: [CUDA] Do not allow dynamic initialization of global device side variables.

Artem Belevich via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 7 14:11:27 PST 2015


tra added inline comments.

================
Comment at: lib/CodeGen/CGDeclCXX.cpp:329
@@ +328,3 @@
+  for (const CXXCtorInitializer *CI: CD->inits())
+    if (CI->isAnyMemberInitializer() && CI->isWritten())
+      return false;
----------------
@rsmith: is this a good way to find member initializer list items?

```
struct S {
    int a,b,c;
    S() : a(1),b(2),c(3) {}
};
```
I'm looking for a(),b(),c() which is what I think CUDA spec wants to check for, but CD->inits() appears to have other initializers on the list as well.


http://reviews.llvm.org/D15305





More information about the cfe-commits mailing list