[Clang] use non-instantiated function declaration for constraints partial ordering
authorYuanfang Chen <yuanfang.chen@sony.com>
Mon, 31 Oct 2022 04:33:22 +0000 (21:33 -0700)
committerYuanfang Chen <yuanfang.chen@sony.com>
Mon, 31 Oct 2022 05:39:47 +0000 (22:39 -0700)
commite18c2c5548f6864def4a110239395a18afc195d6
treea99e5b60085e82d761e2c49c3ca8cf842112fc8a
parent5d086cce8b92680a2cdadf1f07d4267cd374122e
[Clang] use non-instantiated function declaration for constraints partial ordering

Per wordings in
- https://eel.is/c++draft/over.match#best.general-2.6
- https://eel.is/c++draft/temp.constr.order
- https://eel.is/c++draft/temp.constr#atomic-1

constraints partial ordering should use the unsubstituted template
parameters of the constrained entity, not the instantiated entity.

Fix #56154

Reviewed By: erichkeane, royjacobson, mizvekov

Differential Revision: https://reviews.llvm.org/D136545
clang/docs/ReleaseNotes.rst
clang/lib/Sema/SemaConcept.cpp
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaOverload.cpp
clang/test/CXX/over/over.match/over.match.best/p2.cpp
clang/test/CXX/temp/temp.constr/temp.constr.order/non-template-functions.cpp [new file with mode: 0644]