Skip to content

Commit 7a63586

Browse files
committed
[ConstraintSystem] Use the new getConstraintLocator overload
1 parent 376fea1 commit 7a63586

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

lib/Sema/CSDiagnostics.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,7 @@ ProtocolConformance *RequirementFailure::getConformanceForConditionalReq(
151151
return nullptr;
152152
}
153153

154-
auto *typeReqLoc = cs.getConstraintLocator(getRawAnchor(), path.drop_back(),
155-
/*summaryFlags=*/0);
154+
auto *typeReqLoc = cs.getConstraintLocator(getRawAnchor(), path.drop_back());
156155

157156
auto result = llvm::find_if(
158157
cs.CheckedConformances,

lib/Sema/CSSimplify.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2069,13 +2069,11 @@ static ConstraintFix *fixRequirementFailure(ConstraintSystem &cs, Type type1,
20692069
auto reqPath = path.drop_back();
20702070
// If underlying conformance requirement has been fixed,
20712071
// then there is no reason to fix up conditional requirements.
2072-
if (cs.hasFixFor(cs.getConstraintLocator(anchor, reqPath,
2073-
/*summaryFlags=*/0)))
2072+
if (cs.hasFixFor(cs.getConstraintLocator(anchor, reqPath)))
20742073
return nullptr;
20752074
}
20762075

2077-
auto *reqLoc = cs.getConstraintLocator(anchor, path,
2078-
/*summaryFlags=*/0);
2076+
auto *reqLoc = cs.getConstraintLocator(anchor, path);
20792077

20802078
auto reqKind = static_cast<RequirementKind>(req.getValue2());
20812079
switch (reqKind) {

0 commit comments

Comments
 (0)