diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-07-25 18:17:45 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-07-25 18:17:45 +0000 |
commit | ff331c15729f7d4439d253c97f4d60f2a7ffd0c6 (patch) | |
tree | b0ab8d1988b70c1e7717a67a83992b4f4e8319c7 /lib/Sema/SemaDecl.cpp | |
parent | 63fe86bee66fc145942c56b2cc564ea0b9b9ea12 (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.cpp | 5 |
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(); } } |