Skip to content

Commit f54172e

Browse files
committed
[BuilderTransform] Handle ReturnStmt via CONTROL_FLOW_STMT macro
1 parent 54d6bc9 commit f54172e

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

lib/Sema/BuilderTransform.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -337,12 +337,6 @@ class BuilderClosureVisitor
337337
return captureExpr(call, /*oneWay=*/true, braceStmt);
338338
}
339339

340-
VarDecl *visitReturnStmt(ReturnStmt *stmt) {
341-
if (!unhandledNode)
342-
unhandledNode = stmt;
343-
return nullptr;
344-
}
345-
346340
VarDecl *visitDoStmt(DoStmt *doStmt) {
347341
auto childVar = visitBraceStmt(doStmt->getBody());
348342
if (!childVar)
@@ -904,6 +898,7 @@ class BuilderClosureVisitor
904898
CONTROL_FLOW_STMT(Fallthrough)
905899
CONTROL_FLOW_STMT(Fail)
906900
CONTROL_FLOW_STMT(PoundAssert)
901+
CONTROL_FLOW_STMT(Return)
907902

908903
#undef CONTROL_FLOW_STMT
909904
};

0 commit comments

Comments
 (0)