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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to