[all-commits] [llvm/llvm-project] 2cbf27: [clang] fix nondeduced mismatch with nullptr templ...

Matheus Izvekov via All-commits all-commits at lists.llvm.org
Tue Jan 28 13:08:35 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2cbf2798ae55ddc36aac130df21353fc82891bcf
      https://github.com/llvm/llvm-project/commit/2cbf2798ae55ddc36aac130df21353fc82891bcf
  Author: Matheus Izvekov <mizvekov at gmail.com>
  Date:   2025-01-28 (Tue, 28 Jan 2025)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/SemaTemplateDeduction.cpp
    M clang/test/SemaTemplate/cwg2398.cpp

  Log Message:
  -----------
  [clang] fix nondeduced mismatch with nullptr template arguments (#124498)

In deduction, when comparing template arguments of value kind, we should
check if the value matches. Values of different types can still match.
For example, `short(0)` matches `int(0)`.

Values of nullptr kind always match each other, since there is only one
such possible value. Similarly to integrals, the type does not matter.



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