Skip to content

Commit 06f6621

Browse files
committed
Sema: Clean up ExprRewriter::visitParenExpr()
simplifyType() preserves ParenType sugar so we don't have to jump through hoops here.
1 parent 2a1b741 commit 06f6621

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/Sema/CSApply.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2815,11 +2815,7 @@ namespace {
28152815
}
28162816

28172817
Expr *visitParenExpr(ParenExpr *expr) {
2818-
auto &ctx = cs.getASTContext();
2819-
auto pty = cs.getType(expr->getSubExpr());
2820-
cs.setType(expr, ParenType::get(ctx, pty->getInOutObjectType(),
2821-
ParameterTypeFlags().withInOut(pty->is<InOutType>())));
2822-
return expr;
2818+
return simplifyExprType(expr);
28232819
}
28242820

28252821
Expr *visitTupleExpr(TupleExpr *expr) {

0 commit comments

Comments
 (0)