[clang] [SYCL] Correct incomplete AST visitation for UnresolvedSYCLKernelCallStmt. (PR #185531)
Alexey Bader via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 10 09:24:02 PDT 2026
================
@@ -845,6 +846,14 @@ class ASTNodeTraverser
}
}
+ void
+ VisitUnresolvedSYCLKernelCallStmt(const UnresolvedSYCLKernelCallStmt *Node) {
+ Visit(Node->getOriginalStmt());
+ if (Traversal != TK_IgnoreUnlessSpelledInSource) {
+ Visit(Node->getKernelLaunchIdExpr());
+ }
----------------
bader wrote:
To be fair the coding style in this file is inconsistent (the code 20 lines below):
```c++
void VisitInitListExpr(const InitListExpr *ILE) {
if (auto *Filler = ILE->getArrayFiller()) {
Visit(Filler, "array_filler");
}
}
void VisitCXXParenListInitExpr(const CXXParenListInitExpr *PLIE) {
if (auto *Filler = PLIE->getArrayFiller()) {
Visit(Filler, "array_filler");
}
}
void VisitBlockExpr(const BlockExpr *Node) { Visit(Node->getBlockDecl()); }
void VisitOpaqueValueExpr(const OpaqueValueExpr *Node) {
if (Expr *Source = Node->getSourceExpr())
Visit(Source);
}
```
https://github.com/llvm/llvm-project/pull/185531
More information about the cfe-commits
mailing list