[all-commits] [llvm/llvm-project] 28e1e7: Revert "[Clang] Do not treat Foo -> const Foo conv...

Corentin Jabot via All-commits all-commits at lists.llvm.org
Thu Jul 17 02:33:11 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 28e1e7e1b4b059a2e42f68061475cddb4ad0a6a3
      https://github.com/llvm/llvm-project/commit/28e1e7e1b4b059a2e42f68061475cddb4ad0a6a3
  Author: Corentin Jabot <corentinjabot at gmail.com>
  Date:   2025-07-17 (Thu, 17 Jul 2025)

  Changed paths:
    M clang/include/clang/Sema/Overload.h
    M clang/lib/Sema/SemaOverload.cpp
    M clang/test/SemaCXX/overload-resolution-deferred-templates.cpp

  Log Message:
  -----------
  Revert "[Clang] Do not treat Foo -> const Foo conversion sequences as perfect" (#149272)

Reverts llvm/llvm-project#148613

Considering object argument conversion qualifications perfect leads to
situations where we prefer a non-template const qualified function over
a non-qualified template function, which is very wrong indeed.

I explored solutions to work around that, but instead, we might want to
go the GCC road and prefer the friend overload in the #147374 example,
as this seems a lot more consistent and reliable



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