[PATCH] D140828: [C++] Implement "Deducing this" (P0847R7)
Corentin Jabot via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 24 07:06:04 PDT 2023
cor3ntin added inline comments.
================
Comment at: clang/lib/Sema/SemaOverload.cpp:911-915
if (X->getNumParams() != Y->getNumParams())
return false;
for (unsigned I = 0; I < X->getNumParams(); ++I)
if (!Ctx.hasSameUnqualifiedType(X->getParamDecl(I)->getType(),
Y->getParamDecl(I)->getType()))
----------------
cor3ntin wrote:
> aaron.ballman wrote:
> > Do we need changes here?
> Yes, although I need to figure out a test
We need changes.
Which changes is not obvious to me. https://lists.isocpp.org/core/2023/08/14711.php
================
Comment at: clang/lib/Sema/SemaOverload.cpp:996-999
// match than the non-reversed version.
return FD->getNumParams() != 2 ||
!S.Context.hasSameUnqualifiedType(FD->getParamDecl(0)->getType(),
FD->getParamDecl(1)->getType()) ||
----------------
cor3ntin wrote:
> aaron.ballman wrote:
> > Do we need changes here?
> Yes, although I need to figure out a test
UGH, phab ate my comment...
This does not need change.
if the operator has 2 non object parameters, it is implied that it is a non-member binary operator
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140828/new/
https://reviews.llvm.org/D140828
More information about the cfe-commits
mailing list