Skip to content

Commit dc314eb

Browse files
committed
[CSApply] Generalize fully type-checked target printing
Changes `Fully type-checked` output to print any target that could be represented as an ASTNode.
1 parent 007da5e commit dc314eb

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lib/Sema/CSApply.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9189,12 +9189,13 @@ Optional<SolutionApplicationTarget> ConstraintSystem::applySolution(
91899189
return None;
91909190

91919191
if (isDebugMode()) {
9192-
// If we had partially type-checked expressions, lets print
9193-
// fully type-checked expression after processDelayed is done.
9194-
if (needsPostProcessing) {
9192+
// If we had partially type-checked expressions, lets print
9193+
// fully type-checked target after processDelayed is done.
9194+
auto node = target.getAsASTNode();
9195+
if (node && needsPostProcessing) {
91959196
auto &log = llvm::errs();
9196-
log << "---Fully type-checked expression---\n";
9197-
resultTarget->getAsExpr()->dump(log);
9197+
log << "---Fully type-checked target---\n";
9198+
node.dump(log);
91989199
log << "\n";
91999200
}
92009201
}

0 commit comments

Comments
 (0)