[all-commits] [llvm/llvm-project] acf07d: [Clang] Do not treat Foo -> const Foo conversion s...

Corentin Jabot via All-commits all-commits at lists.llvm.org
Tue Jul 15 00:18:46 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: acf07dc77cba07d67c85e120c2eb8094438572e9
      https://github.com/llvm/llvm-project/commit/acf07dc77cba07d67c85e120c2eb8094438572e9
  Author: Corentin Jabot <corentinjabot at gmail.com>
  Date:   2025-07-15 (Tue, 15 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:
  -----------
  [Clang] Do not treat Foo -> const Foo conversion sequences as perfect (#148613)

For implicit object arguments.
This fixes a regression introduced by the "perfect match" overload
resolution mechanism introduced in 8c5a307.

Note that GCC allows the ambiguity between a const and non-const
candidate to be resolved. But this patch focuses on restoring the Clang
20 behavior, and to fix the cases which we did resolve incorrectly.

Fixes #147374



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