[clang] [clang][NFC] Extract LookupOverloadedUnaryOp (PR #210567)
Corentin Jabot via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 20 04:53:36 PDT 2026
================
@@ -15221,6 +15221,32 @@ ExprResult Sema::BuildCXXMemberCallExpr(Expr *E, NamedDecl *FoundDecl,
return CheckForImmediateInvocation(CE, CE->getDirectCallee());
}
+void Sema::LookupOverloadedUnaryOp(OverloadCandidateSet &CandidateSet,
+ OverloadedOperatorKind Op,
+ const UnresolvedSetImpl &Fns,
+ ArrayRef<Expr *> Args, bool PerformADL) {
+ assert(Op != OO_None && "Invalid opcode for overloaded unary operator");
+
+ SourceLocation OpLoc = CandidateSet.getLocation();
+ DeclarationName OpName = Context.DeclarationNames.getCXXOperatorName(Op);
+
+ // Add the candidates from the given function set.
+ AddNonMemberOperatorCandidates(Fns, Args, CandidateSet);
+
+ // Add operator candidates that are member functions.
+ AddMemberOperatorCandidates(Op, OpLoc, Args, CandidateSet);
----------------
cor3ntin wrote:
These comments are not actually adding anything, feel free to drop them
https://github.com/llvm/llvm-project/pull/210567
More information about the cfe-commits
mailing list