Skip to content

Commit 840d52f

Browse files
committed
[ASTDumper] Remove special case for single expr functions
We don't do the same for closures, and I don't see any reason why we should obscure the real AST from the dump.
1 parent d5a3e36 commit 840d52f

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

lib/AST/ASTDumper.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,17 +1533,6 @@ namespace {
15331533
});
15341534
}
15351535

1536-
if (D->hasSingleExpressionBody()) {
1537-
// There won't be an expression if this is an initializer that was
1538-
// originally spelled "init?(...) { nil }", because "nil" is modeled
1539-
// via FailStmt in this context.
1540-
if (auto *Body = D->getSingleExpressionBody()) {
1541-
printRec(Body);
1542-
1543-
return;
1544-
}
1545-
}
1546-
15471536
if (auto Body = D->getBody(/*canSynthesize=*/false)) {
15481537
printRec(Body, &D->getASTContext());
15491538
}

0 commit comments

Comments
 (0)