================
@@ -2787,112 +2789,75 @@ static void
diagnoseNoViableFunctionForAllocationOverloadResolution(
Candidates.NoteCandidates(S, Args, Cands, "", R.getNameLoc());
}
-enum class ResolveMode { Typed, Untyped };
-static bool resolveAllocationOverloadInterior(
- Sema &S, LookupResult &R, SourceRange Range, ResolveMode Mode,
- SmallVectorImpl<Expr *> &Args, AlignedAllocationMode &PassAlignment,
- FunctionDecl *&Operator, OverloadCandidateSet *AlignedCandidates,
- Expr *AlignArg, bool Diagnose) {
- unsigned NonTypeArgumentOffset = 0;
- if (Mode == ResolveMode::Typed) {
- ++NonTypeArgumentOffset;
- }
+using ImplicitAllocationArguments = Sema::ImplicitAllocationArguments;
+using AllocationArgumentSet = Sema::AllocationArgumentSet;
- OverloadCandidateSet Candidates(R.getNameLoc(),
- OverloadCandidateSet::CSK_Normal);
+enum class AllocatorResolveResult { Success, Retry, Error };
+static AllocatorResolveResult
+resolveAllocationOverload(Sema &S, LookupResult &R, SourceRange Range,
+ ImplicitAllocationArguments &AllocationArgs,
+ ArrayRef<Expr *> TrialArguments,
+ FunctionDecl *&Operator,
+ OverloadCandidateSet &Candidates, bool Diagnose) {
+ AllocationArgs.updateLookupForMSVCCompatibility(S, R);
----------------
cor3ntin wrote:
We used to do that on overload resolution failure(ie no viable function found).
Here either I do not understand what's going on, or the fallback is performed
before overload resolution.
https://github.com/llvm/llvm-project/pull/211482
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits