[clang] [clang][SYCL] Diagnose reference kernel arguments (PR #192957)
Tom Honermann via cfe-commits
cfe-commits at lists.llvm.org
Mon May 25 22:39:21 PDT 2026
================
@@ -665,6 +666,101 @@ OutlinedFunctionDecl *BuildSYCLKernelEntryPointOutline(Sema &SemaRef,
return OFD;
}
+class KernelArgsChecker : public SubobjectVisitor<KernelArgsChecker> {
----------------
tahonermann wrote:
I think `KernelArgsChecker` should be able to derive from `ConstSubobjectVisitor`; we shouldn't need to modify any objects. If doing so runs into problems because of const correctness issues elsewhere though, it probably isn't worth trying to change.
```suggestion
class KernelArgsChecker : public ConstSubobjectVisitor<KernelArgsChecker> {
```
https://github.com/llvm/llvm-project/pull/192957
More information about the cfe-commits
mailing list