This revision was automatically updated to reflect the committed changes.
Closed by commit rGc33e296be1da: [OpenCL] Disallows static kernel functions in
C++ for OpenCL (authored by Topotuna).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109150/new/
Anastasia accepted this revision.
Anastasia added a comment.
This revision is now accepted and ready to land.
Cool! Thanks
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109150/new/
https://reviews.llvm.org/D109150
___
cfe-commits mailing
Topotuna updated this revision to Diff 370895.
Topotuna added a comment.
Condition on OpenCL C / C++ for OpenCL version removed because it was redundant.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109150/new/
https://reviews.llvm.org/D109150
Files:
clang/lib/Sema/SemaDecl.cpp
Topotuna added inline comments.
Comment at: clang/lib/Sema/SemaDecl.cpp:9972
// OpenCL v1.2 s6.8 static is invalid for kernel functions.
-if ((getLangOpts().OpenCLVersion >= 120)
-&& (SC == SC_Static)) {
+if ((getLangOpts().getOpenCLCompatibleVersion() >=
Anastasia added inline comments.
Comment at: clang/lib/Sema/SemaDecl.cpp:9972
// OpenCL v1.2 s6.8 static is invalid for kernel functions.
-if ((getLangOpts().OpenCLVersion >= 120)
-&& (SC == SC_Static)) {
+if ((getLangOpts().getOpenCLCompatibleVersion() >=
Topotuna created this revision.
Topotuna added a reviewer: Anastasia.
Herald added subscribers: ldrumm, yaxunl.
Topotuna requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
It is disallowed in OpenCL C to declare static kernel functions and