[clang] [Clang] [CUDA] Support ADL kernel launches (PR #240947)

Mariya Podchishchaeva via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 11 03:39:36 PST 2026


================
@@ -7425,11 +7422,10 @@ ExprResult Sema::BuildResolvedCallExpr(Expr *Fn, NamedDecl *NDecl,
 
   CallExpr *TheCall;
   if (Config) {
-    assert(UsesADL == ADLCallKind::NotADL &&
-           "CUDAKernelCallExpr should not use ADL");
     TheCall = CUDAKernelCallExpr::Create(Context, Fn, cast<CallExpr>(Config),
                                          Args, ResultTy, VK_PRValue, RParenLoc,
                                          CurFPFeatureOverrides(), NumParams);
+    TheCall->setADLCallKind(UsesADL);
----------------
Fznamznon wrote:

Should the constructor of `CUDAKernelCallExpr` instead have `UsesADL` parameter? Right now it is hardcoded to always be nonADL by https://reviews.llvm.org/D55534 which assumed that CUDA kernel calls never use ADL.

https://github.com/llvm/llvm-project/pull/240947


More information about the cfe-commits mailing list