Skip to content

Commit 154cea9

Browse files
author
Amritpan Kaur
committed
[Constraint] Add indentations to conj/disjunction printing.
This indents conj/disjuctions when they are printed as added/removed constraints.
1 parent 2cbcea9 commit 154cea9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

include/swift/Sema/ConstraintSystem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4426,7 +4426,7 @@ class ConstraintSystem {
44264426
auto &log = llvm::errs();
44274427
log.indent(solverState->getCurrentIndent() + 2);
44284428
log << "(added constraint: ";
4429-
constraint->print(log, &getASTContext().SourceMgr);
4429+
constraint->print(log, &getASTContext().SourceMgr, solverState->getCurrentIndent() + 4);
44304430
log << ")\n";
44314431
}
44324432

lib/Sema/Constraint.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ void Constraint::print(llvm::raw_ostream &Out, SourceManager *sm, unsigned inden
359359

360360
interleave(sortedConstraints,
361361
[&](Constraint *constraint) {
362+
Out.indent(indent);
362363
if (constraint->isDisabled())
363364
Out << "> [disabled] ";
364365
else if (constraint->isFavored())

0 commit comments

Comments
 (0)