Skip to content

Commit ec6bc5b

Browse files
authored
Merge pull request #31573 from brentdax/explicit-iuo
[NFC] Include implicit-unwrap bit in AST dump
2 parents a7d5733 + b3f79f7 commit ec6bc5b

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
@@ -2673,7 +2673,11 @@ class PrintExpr : public ExprVisitor<PrintExpr> {
26732673
PrintWithColorRAII(OS, ParenthesisColor) << ')';
26742674
}
26752675
void visitForceValueExpr(ForceValueExpr *E) {
2676-
printCommon(E, "force_value_expr") << '\n';
2676+
printCommon(E, "force_value_expr");
2677+
if (E->isForceOfImplicitlyUnwrappedOptional())
2678+
PrintWithColorRAII(OS, ExprModifierColor) << " implicit_iuo_unwrap";
2679+
OS << '\n';
2680+
26772681
printRec(E->getSubExpr());
26782682
PrintWithColorRAII(OS, ParenthesisColor) << ')';
26792683
}

0 commit comments

Comments
 (0)