[PATCH] D100471: [C++4OpenCL] Add extra diagnostics for kernel argument types
Anastasia Stulova via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 15 06:02:09 PDT 2021
Anastasia added a comment.
LGTM from my side. I will leave final approval to Sven.
================
Comment at: clang/lib/Sema/SemaDecl.cpp:8673
+ // reference if an implementation supports them in kernel parameters.
+ if (!PointeeType->isAtomicType() && !PointeeType->isVoidType() &&
+ !PointeeType->isStandardLayoutType())
----------------
svenvh wrote:
> I am wondering if this should be made conditional on C++ mode? Or is there no possible way that this new `return InvalidKernelParam` can be triggered from OpenCL C mode?
I think it shouldn't because C types are POD types which is a superset of standard layout types.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100471/new/
https://reviews.llvm.org/D100471
More information about the cfe-commits
mailing list