[clang] [clang][Sema][CUDA] Restrict immediate template resolution to host-device functions (PR #200662)

Weibo He via cfe-commits cfe-commits at lists.llvm.org
Sun Jun 7 20:25:49 PDT 2026


NewSigma wrote:

> Thanks Artem. I think the approach is sound and generally safe to land. Pure host code under -x cuda compiles again, while host-device callers keep the eager resolution they need, and I don't see regressions in the cases I'd worry about.
> 
> The main gap is test coverage. The current test only hits method templates with no host/device attributes. Before landing, I'd like a minimal positive case, coverage for the free-function and conversion-operator paths the patch also touches, and a host-device case that fails if the carve-out is removed.

Thanks. I’ve managed to reduce the test to a smaller one. The free-function and conversion-operator paths are covered (both positive and negative cases), and the host-device case is included.

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


More information about the cfe-commits mailing list