File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -2095,10 +2095,15 @@ class ConstraintSystem {
2095
2095
2096
2096
// / Determine whether constraint system already has a fix recorded
2097
2097
// / for a particular location.
2098
- bool hasFixFor (ConstraintLocator *locator) const {
2099
- return llvm::any_of (Fixes, [&locator](const ConstraintFix *fix) {
2100
- return fix->getLocator () == locator;
2101
- });
2098
+ bool hasFixFor (ConstraintLocator *locator,
2099
+ Optional<FixKind> expectedKind = None) const {
2100
+ return llvm::any_of (
2101
+ Fixes, [&locator, &expectedKind](const ConstraintFix *fix) {
2102
+ if (fix->getLocator () == locator) {
2103
+ return !expectedKind || fix->getKind () == *expectedKind;
2104
+ }
2105
+ return false ;
2106
+ });
2102
2107
}
2103
2108
2104
2109
// / If an UnresolvedDotExpr, SubscriptMember, etc has been resolved by the
You can’t perform that action at this time.
0 commit comments