[clang] [CUDA][HIP] capture possible ODR-used var (PR #136645)

2025-04-23 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu closed https://github.com/llvm/llvm-project/pull/136645 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA][HIP] capture possible ODR-used var (PR #136645)

2025-04-23 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/136645 >From 834f1eed2ffde0b15209fca6560191911151c9f6 Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Wed, 16 Apr 2025 11:09:16 -0400 Subject: [PATCH] [CUDA][HIP] capture possible ODR-used var In a lambda func

[clang] [CUDA][HIP] capture possible ODR-used var (PR #136645)

2025-04-23 Thread Yaxun Liu via cfe-commits
@@ -1100,3 +1101,49 @@ std::string SemaCUDA::getConfigureFuncName() const { // Legacy CUDA kernel configuration call return "cudaConfigureCall"; } + +// Record any local constexpr variables that are passed one way on the host +// and another on the device. +void SemaCUDA::r

[clang] [CUDA][HIP] capture possible ODR-used var (PR #136645)

2025-04-22 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. LGTM w/ a nit. https://github.com/llvm/llvm-project/pull/136645 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA][HIP] capture possible ODR-used var (PR #136645)

2025-04-22 Thread Artem Belevich via cfe-commits
@@ -1100,3 +1101,49 @@ std::string SemaCUDA::getConfigureFuncName() const { // Legacy CUDA kernel configuration call return "cudaConfigureCall"; } + +// Record any local constexpr variables that are passed one way on the host +// and another on the device. +void SemaCUDA::r

[clang] [CUDA][HIP] capture possible ODR-used var (PR #136645)

2025-04-22 Thread Artem Belevich via cfe-commits
@@ -1100,3 +1101,49 @@ std::string SemaCUDA::getConfigureFuncName() const { // Legacy CUDA kernel configuration call return "cudaConfigureCall"; } + +// Record any local constexpr variables that are passed one way on the host +// and another on the device. +void SemaCUDA::r

[clang] [CUDA][HIP] capture possible ODR-used var (PR #136645)

2025-04-22 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B edited https://github.com/llvm/llvm-project/pull/136645 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA][HIP] capture possible ODR-used var (PR #136645)

2025-04-21 Thread Yaxun Liu via cfe-commits
@@ -14706,6 +14706,8 @@ ExprResult Sema::BuildOverloadedCallExpr(Scope *S, Expr *Fn, // the UnresolvedLookupExpr was type-dependent. if (OverloadResult == OR_Success) { const FunctionDecl *FDecl = Best->Function; +if (LangOpts.CUDA) yxsamliu wrote:

[clang] [CUDA][HIP] capture possible ODR-used var (PR #136645)

2025-04-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Yaxun (Sam) Liu (yxsamliu) Changes In a lambda function, a call of a function may resolve to host and device functions with different signatures. Especially, a constexpr local variable may be passed by value by the device function and passe

[clang] [CUDA][HIP] capture possible ODR-used var (PR #136645)

2025-04-21 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu created https://github.com/llvm/llvm-project/pull/136645 In a lambda function, a call of a function may resolve to host and device functions with different signatures. Especially, a constexpr local variable may be passed by value by the device function and passed by r