We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da98eb3 commit 3f3e643Copy full SHA for 3f3e643
lib/AST/ASTPrinter.cpp
@@ -4556,8 +4556,7 @@ void PrintAST::visitBraceStmt(BraceStmt *stmt) {
4556
void PrintAST::visitReturnStmt(ReturnStmt *stmt) {
4557
if (!stmt->hasResult()) {
4558
if (auto *FD = dyn_cast<AbstractFunctionDecl>(Current)) {
4559
- if (FD->hasBody()) {
4560
- auto *Body = FD->getBody();
+ if (auto *Body = FD->getBody()) {
4561
if (Body->getLastElement().dyn_cast<Stmt *>() == stmt) {
4562
// Don't print empty return.
4563
return;
0 commit comments