[PATCH] D59646: [PR40778][PR41157][OpenCL] Prevent implicit initialization of local address space objects
Alexey Bader via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 25 05:50:23 PDT 2019
bader added inline comments.
================
Comment at: test/CodeGenOpenCLCXX/local_addrspace_init.cl:12
+ __local int i;
+ __local C ii;
+ //FIXME: In OpenCL C we don't accept initializers for local address space variables.
----------------
Anastasia wrote:
> bader wrote:
> > I guess this declaration should be disallowed for non-POD types. Can we add a check for that to some test/Sema* test?
> What should be disallowed specifically? Declaring non-POD types in the local address space?
Something like
```
class C {
int i = 0;
};
kernel void test() {
__local C c; // error
}
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59646/new/
https://reviews.llvm.org/D59646
More information about the cfe-commits
mailing list