Skip to content

Commit f7744bd

Browse files
committed
[Constraint solver] Make DeclContext explicit. NFC
1 parent 66c9da0 commit f7744bd

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/Sema/CSSolver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ bool ConstraintSystem::Candidate::solve(
591591
cs.Timer.emplace(E, cs);
592592

593593
// Generate constraints for the new system.
594-
if (auto generatedExpr = cs.generateConstraints(E)) {
594+
if (auto generatedExpr = cs.generateConstraints(E, DC)) {
595595
E = generatedExpr;
596596
} else {
597597
// Failure to generate constraint system for sub-expression
@@ -1215,7 +1215,7 @@ ConstraintSystem::solveImpl(Expr *&expr,
12151215
shrink(expr);
12161216

12171217
// Generate constraints for the main system.
1218-
if (auto generatedExpr = generateConstraints(expr))
1218+
if (auto generatedExpr = generateConstraints(expr, DC))
12191219
expr = generatedExpr;
12201220
else {
12211221
if (listener)

lib/Sema/ConstraintSystem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3078,7 +3078,7 @@ class ConstraintSystem {
30783078
/// Generate constraints for the given (unchecked) expression.
30793079
///
30803080
/// \returns a possibly-sanitized expression, or null if an error occurred.
3081-
Expr *generateConstraints(Expr *E, DeclContext *dc = nullptr);
3081+
Expr *generateConstraints(Expr *E, DeclContext *dc);
30823082

30833083
/// Generate constraints for binding the given pattern to the
30843084
/// value of the given expression.

lib/Sema/TypeCheckConstraints.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2466,7 +2466,7 @@ getTypeOfCompletionOperatorImpl(DeclContext *DC, Expr *expr,
24662466

24672467
// Construct a constraint system from this expression.
24682468
ConstraintSystem CS(DC, options);
2469-
expr = CS.generateConstraints(expr);
2469+
expr = CS.generateConstraints(expr, DC);
24702470
if (!expr)
24712471
return nullptr;
24722472

0 commit comments

Comments
 (0)