[all-commits] [llvm/llvm-project] 6d7962: [clang][CUDA] Avoid ambiguity in host/device templ...

Steffen Larsen via All-commits all-commits at lists.llvm.org
Tue Jun 2 20:45:57 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6d7962db9397eefe3a287115d413fd4c562e4178
      https://github.com/llvm/llvm-project/commit/6d7962db9397eefe3a287115d413fd4c562e4178
  Author: Steffen Larsen <sholstla at amd.com>
  Date:   2026-06-03 (Wed, 03 Jun 2026)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/SemaOverload.cpp
    M clang/test/SemaCUDA/addr-of-overloaded-fn.cu
    A clang/test/SemaCUDA/addr-of-overloaded-template-fn.cu

  Log Message:
  -----------
  [clang][CUDA] Avoid ambiguity in host/device template specializations (#201049)

This commit changes SemaOverload to resolve an otherwise diagnosed
ambiguity between addresses of template specializations of functions
that are overloaded for both device and host. Similar to how it works
for non-templated function overloads, these changes prioritizes the
specializations that corresponds to the target of the owning function,
i.e. if compiling for host, the address of the host specialization takes
precedence over the device specialization and vice versa.

Fixes https://github.com/llvm/llvm-project/issues/199299

---------

Signed-off-by: Steffen Holst Larsen <sholstla at amd.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list