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

Corentin Jabot via All-commits all-commits at lists.llvm.org
Thu Jul 17 09:00:46 PDT 2025


  Branch: refs/heads/release/21.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 7ac3c6228233980e154cdbc294def0cc66063bc1
      https://github.com/llvm/llvm-project/commit/7ac3c6228233980e154cdbc294def0cc66063bc1
  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

(cherry picked from commit 28e1e7e1b4b059a2e42f68061475cddb4ad0a6a3)



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