[all-commits] [llvm/llvm-project] 63afcb: [clang][Sema] Bugfix for choosing the more special...
Botond István Horváth via All-commits
all-commits at lists.llvm.org
Wed Mar 6 06:03:33 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 63afcbbeeaf68751b57acc1f2911afee767d86bb
https://github.com/llvm/llvm-project/commit/63afcbbeeaf68751b57acc1f2911afee767d86bb
Author: Botond István Horváth <horvath.botond.istvan at gmail.com>
Date: 2024-03-06 (Wed, 06 Mar 2024)
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
M clang/test/CXX/drs/dr24xx.cpp
M clang/test/SemaCXX/overload-template.cpp
M clang/test/SemaCXX/overloaded-operator.cpp
M clang/www/cxx_dr_status.html
Log Message:
-----------
[clang][Sema] Bugfix for choosing the more specialized overload (#83279)
There was a bug in Clang where it couldn't choose which overload
candidate was more specialized if it was comparing a member-function to
a non-member function. Previously, this was detected as an ambiguity,
now Clang chooses correctly.
This patch fixes the bug by fully implementing CWG2445 and moving the
template transformation described in `[temp.func.order]` paragraph 3
from `isAtLeastAsSpecializedAs()` to
`Sema::getMoreSpecializedTemplate()` so we have the transformed
parameter list during the whole comparison. Also, to be able to add the
correct type for the implicit object parameter
`Sema::getMoreSpecializedTemplate()` has new parameters for the object
type.
Fixes #74494, fixes #82509
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