@@ -3398,13 +3398,11 @@ class PrintExpr : public ExprVisitor<PrintExpr, void, Label>,
33983398 // / FIXME: This should use ExprWalker to print children.
33993399
34003400 void printCommon (Expr *E, const char *C, Label label) {
3401- PrintOptions PO;
3402- PO.PrintTypesForDebugging = true ;
3403-
34043401 printHead (C, ExprColor, label);
34053402
34063403 printFlag (E->isImplicit (), " implicit" , ExprModifierColor);
3407- printTypeField (GetTypeOfExpr (E), Label::always (" type" ), PO, TypeColor);
3404+ printTypeField (GetTypeOfExpr (E), Label::always (" type" ),
3405+ PrintOptions::forDebugging (), TypeColor);
34083406
34093407 // If we have a source range and an ASTContext, print the source range.
34103408 if (auto Ty = GetTypeOfExpr (E)) {
@@ -4054,10 +4052,8 @@ class PrintExpr : public ExprVisitor<PrintExpr, void, Label>,
40544052 void visitForceTryExpr (ForceTryExpr *E, Label label) {
40554053 printCommon (E, " force_try_expr" , label);
40564054
4057- PrintOptions PO;
4058- PO.PrintTypesForDebugging = true ;
4059- printTypeField (E->getThrownError (), Label::always (" thrown_error" ), PO,
4060- TypeColor);
4055+ printTypeField (E->getThrownError (), Label::always (" thrown_error" ),
4056+ PrintOptions::forDebugging (), TypeColor);
40614057
40624058 printRec (E->getSubExpr (), Label::optional (" sub_expr" ));
40634059 printFoot ();
@@ -4066,10 +4062,8 @@ class PrintExpr : public ExprVisitor<PrintExpr, void, Label>,
40664062 void visitOptionalTryExpr (OptionalTryExpr *E, Label label) {
40674063 printCommon (E, " optional_try_expr" , label);
40684064
4069- PrintOptions PO;
4070- PO.PrintTypesForDebugging = true ;
4071- printTypeField (E->getThrownError (), Label::always (" thrown_error" ), PO,
4072- TypeColor);
4065+ printTypeField (E->getThrownError (), Label::always (" thrown_error" ),
4066+ PrintOptions::forDebugging (), TypeColor);
40734067
40744068 printRec (E->getSubExpr (), Label::optional (" sub_expr" ));
40754069 printFoot ();
@@ -4553,10 +4547,8 @@ class PrintExpr : public ExprVisitor<PrintExpr, void, Label>,
45534547 void visitTypeValueExpr (TypeValueExpr *E, Label label) {
45544548 printCommon (E, " type_value_expr" , label);
45554549
4556- PrintOptions PO;
4557- PO.PrintTypesForDebugging = true ;
4558- printTypeField (E->getParamType (), Label::always (" param_type" ), PO,
4559- TypeColor);
4550+ printTypeField (E->getParamType (), Label::always (" param_type" ),
4551+ PrintOptions::forDebugging (), TypeColor);
45604552
45614553 printFoot ();
45624554 }
0 commit comments