[PATCH] D134529: [C++20][Clang] P2468R2 The Equality Operator You Are Looking For
Utkarsh Saxena via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 29 13:42:16 PDT 2022
usaxena95 added inline comments.
================
Comment at: clang/lib/Sema/SemaOverload.cpp:887
-bool OverloadCandidateSet::OperatorRewriteInfo::shouldAddReversed(
- OverloadedOperatorKind Op) {
----------------
ilya-biryukov wrote:
> Why do we need to move this from `OperatorRewriteInfo` to `OverloadCandidateSet`?
>
We are using operator location for search which is part of OverloadCandidateSet.
I propagated it to the RewriteInfo without shuffling these declarations.
================
Comment at: clang/lib/Sema/SemaOverload.cpp:918
+ for (NamedDecl *Op : Members)
+ if (S.Context.hasSameUnqualifiedType(
+ MD->getParamDecl(0)->getType(),
----------------
ilya-biryukov wrote:
> Could we implement the "corresponds" check from [(basic.scope.scope)p4](https://eel.is/c++draft/basic.scope.scope) directly?
>
> This should address the existing FIXMEs about `const` members and template functions.
Implemented the corresponds and search through LookupName.
Needs additional filtering based on matching `DeclContext` to verify they are from the same namespace.
I was not able to find any utility which facilitates "search" out of the box. Does this look good ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134529/new/
https://reviews.llvm.org/D134529
More information about the cfe-commits
mailing list