This revision was automatically updated to reflect the committed changes.
Closed by commit rC357684: [PR41157][OpenCL] Prevent implicit init of local
addr space var in C++ mode. (authored by stulova, committed by ).
Herald added a project: clang.
Changed prior to commit:
rjmccall accepted this revision.
rjmccall added a comment.
This revision is now accepted and ready to land.
LGTM.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59646/new/
https://reviews.llvm.org/D59646
___
cfe-commits mailing list
Anastasia updated this revision to Diff 193474.
Anastasia added a comment.
Improved comment about initializers in __local addr space.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59646/new/
https://reviews.llvm.org/D59646
Files:
lib/Sema/SemaDecl.cpp
rjmccall added inline comments.
Comment at: lib/Sema/SemaDecl.cpp:11648-11651
+// In OpenCL we don't allow to initialize objects in local address space.
+if (getLangOpts().OpenCL &&
+Var->getType().getAddressSpace() == LangAS::opencl_local)
+ return;
Anastasia marked an inline comment as done.
Anastasia 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.
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
Anastasia added inline comments.
Comment at: lib/Sema/SemaDecl.cpp:11648-11651
+// In OpenCL we don't allow to initialize objects in local address space.
+if (getLangOpts().OpenCL &&
+Var->getType().getAddressSpace() == LangAS::opencl_local)
+ return;
Anastasia updated this revision to Diff 192087.
Anastasia marked 2 inline comments as done.
Anastasia added a comment.
Fixed typo in the comment.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59646/new/
https://reviews.llvm.org/D59646
Files:
lib/Sema/SemaDecl.cpp
bader added inline comments.
Comment at: lib/Sema/SemaDecl.cpp:11648-11651
+// In OpenCL we don't allow to initialize objects in local address space.
+if (getLangOpts().OpenCL &&
+Var->getType().getAddressSpace() == LangAS::opencl_local)
+ return;
Anastasia created this revision.
Anastasia added reviewers: rjmccall, bader.
Herald added a subscriber: ebevhan.
Anastasia retitled this revision from "[PR40778][PR41157] Prevent implicit
initialization of local address space objects" to "[PR40778][PR41157][OpenCL]
Prevent implicit
10 matches
Mail list logo