aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaStmt.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-07-25 18:17:45 +0000
committerDouglas Gregor <dgregor@apple.com>2010-07-25 18:17:45 +0000
commitff331c15729f7d4439d253c97f4d60f2a7ffd0c6 (patch)
treeb0ab8d1988b70c1e7717a67a83992b4f4e8319c7 /lib/Sema/SemaStmt.cpp
parent63fe86bee66fc145942c56b2cc564ea0b9b9ea12 (diff)
Remove the vast majority of the Destroy methods from the AST library,
since we aren't going to be calling them ever. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109377 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r--lib/Sema/SemaStmt.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp
index 075f662824..58131daf83 100644
--- a/lib/Sema/SemaStmt.cpp
+++ b/lib/Sema/SemaStmt.cpp
@@ -458,10 +458,8 @@ Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc, StmtArg Switch,
SS->setBody(BodyStmt, SwitchLoc);
getSwitchStack().pop_back();
- if (SS->getCond() == 0) {
- SS->Destroy(Context);
+ if (SS->getCond() == 0)
return StmtError();
- }
Expr *CondExpr = SS->getCond();
Expr *CondExprBeforePromotion = CondExpr;
@@ -1086,7 +1084,6 @@ Sema::ActOnBlockReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp) {
if (CurBlock->ReturnType->isVoidType()) {
if (RetValExp) {
Diag(ReturnLoc, diag::err_return_block_has_expr);
- RetValExp->Destroy(Context);
RetValExp = 0;
}
Result = new (Context) ReturnStmt(ReturnLoc, RetValExp, 0);