[all-commits] [llvm/llvm-project] 807e41: [Concepts] Fix overload resolution bug with constr...

royjacobson via All-commits all-commits at lists.llvm.org
Sat Apr 23 14:25:12 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 807e418413a0958ad1ea862093fb262673b2afa1
  Author: Roy Jacobson <roi.jacobson1 at gmail.com>
  Date:   2022-04-23 (Sat, 23 Apr 2022)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Sema/SemaOverload.cpp
    M clang/lib/Sema/SemaTemplateDeduction.cpp
    A clang/test/CXX/temp/temp.decls/temp.fct/temp.func.order/p6.cpp

  Log Message:
  [Concepts] Fix overload resolution bug with constrained candidates

When doing overload resolution, we have to check that candidates' parameter types are equal before trying to find a better candidate through checking which candidate is more constrained.
This revision adds this missing check and makes us diagnose those cases as ambiguous calls when the types are not equal.

Fixes GitHub issue https://github.com/llvm/llvm-project/issues/53640

Reviewed By: erichkeane

Differential Revision: https://reviews.llvm.org/D123182

More information about the All-commits mailing list