Skip to content

Commit b3f79f7

Browse files
committed
[NFC] Include implicit-unwrap bit in AST dump
There’s a bit in the AST indicating whether a ForceValueExpr is an implicitly-inserted unwrap of an IUO, but it’s not included in the AST dump. Add it.
1 parent 3d3daa1 commit b3f79f7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/AST/ASTDumper.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2659,7 +2659,11 @@ class PrintExpr : public ExprVisitor<PrintExpr> {
26592659
PrintWithColorRAII(OS, ParenthesisColor) << ')';
26602660
}
26612661
void visitForceValueExpr(ForceValueExpr *E) {
2662-
printCommon(E, "force_value_expr") << '\n';
2662+
printCommon(E, "force_value_expr");
2663+
if (E->isForceOfImplicitlyUnwrappedOptional())
2664+
PrintWithColorRAII(OS, ExprModifierColor) << " implicit_iuo_unwrap";
2665+
OS << '\n';
2666+
26632667
printRec(E->getSubExpr());
26642668
PrintWithColorRAII(OS, ParenthesisColor) << ')';
26652669
}

0 commit comments

Comments
 (0)