aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.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/SemaDecl.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/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 7360805f60..11e1ffe107 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -4731,7 +4731,6 @@ Sema::DeclPtrTy Sema::ActOnFinishFunctionBody(DeclPtrTy D, StmtArg BodyArg,
if (!MD->isInvalidDecl())
DiagnoseUnusedParameters(MD->param_begin(), MD->param_end());
} else {
- Body->Destroy(Context);
return DeclPtrTy();
}
@@ -4755,8 +4754,7 @@ Sema::DeclPtrTy Sema::ActOnFinishFunctionBody(DeclPtrTy D, StmtArg BodyArg,
// the function body so that they aren't leaked and that the AST is well
// formed.
if (Body == 0) {
- // The whole function wasn't parsed correctly, just delete this.
- L->Destroy(Context);
+ // The whole function wasn't parsed correctly.
continue;
}
@@ -6576,7 +6574,6 @@ Sema::DeclPtrTy Sema::ActOnEnumConstant(Scope *S, DeclPtrTy theEnumDecl,
else
Diag(IdLoc, diag::err_redefinition) << Id;
Diag(PrevDecl->getLocation(), diag::note_previous_definition);
- if (Val) Val->Destroy(Context);
return DeclPtrTy();
}
}