Skip to content

Commit a4a7207

Browse files
author
Amritpan Kaur
committed
[ConstraintGraph] Correct dis/conjunction indents.
1 parent 254bd82 commit a4a7207

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Diff for: lib/Sema/Constraint.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -359,13 +359,14 @@ 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())
365366
Out << "> [favored] ";
366367
else
367368
Out << "> ";
368-
constraint->print(Out, sm,
369+
constraint->print(Out, sm, indent,
369370
/*skipLocator=*/constraint->getLocator() == Locator);
370371
},
371372
[&] { Out << "\n"; });

Diff for: lib/Sema/ConstraintGraph.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1651,7 +1651,7 @@ void ConstraintGraph::dumpActiveScopeChanges(llvm::raw_ostream &out,
16511651
for (const auto &constraint : addedConstraints) {
16521652
out.indent(indent + 4);
16531653
out << "> ";
1654-
constraint->print(out, &CS.getASTContext().SourceMgr);
1654+
constraint->print(out, &CS.getASTContext().SourceMgr, indent + 6);
16551655
out << '\n';
16561656
}
16571657
out.indent(indent + 2);
@@ -1665,7 +1665,7 @@ void ConstraintGraph::dumpActiveScopeChanges(llvm::raw_ostream &out,
16651665
for (const auto &constraint : removedConstraints) {
16661666
out.indent(indent + 4);
16671667
out << "> ";
1668-
constraint->print(out, &CS.getASTContext().SourceMgr);
1668+
constraint->print(out, &CS.getASTContext().SourceMgr, indent + 6);
16691669
out << '\n';
16701670
}
16711671
out.indent(indent + 2);

0 commit comments

Comments
 (0)