File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -5560,11 +5560,14 @@ bool ArgumentMismatchFailure::diagnoseUseOfReferenceEqualityOperator() const {
5560
5560
// let's avoid producing a diagnostic second time, because first
5561
5561
// one would cover both arguments.
5562
5562
if (getAsExpr (getAnchor ()) == rhs && rhsType->is <FunctionType>()) {
5563
- auto &cs = getConstraintSystem ();
5564
- if (cs.hasFixFor (getConstraintLocator (
5565
- binaryOp, {ConstraintLocator::ApplyArgument,
5566
- LocatorPathElt::ApplyArgToParam (
5567
- 0 , 0 , getParameterFlagsAtIndex (0 ))})))
5563
+ auto *argLoc = getConstraintLocator (
5564
+ binaryOp,
5565
+ {ConstraintLocator::ApplyArgument,
5566
+ LocatorPathElt::ApplyArgToParam (0 , 0 , getParameterFlagsAtIndex (0 ))});
5567
+
5568
+ if (llvm::any_of (getSolution ().Fixes , [&argLoc](const ConstraintFix *fix) {
5569
+ return fix->getLocator () == argLoc;
5570
+ }))
5568
5571
return true ;
5569
5572
}
5570
5573
You can’t perform that action at this time.
0 commit comments