aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaType.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-02-07 01:51:40 +0000
committerTed Kremenek <kremenek@apple.com>2009-02-07 01:51:40 +0000
commit169a2664a64b57a815b5f0b39276a0891663921a (patch)
tree3546239307f6288c1233c2598512145896ed2272 /lib/Sema/SemaType.cpp
parent8189cde56b4f6f938cd65f53c932fe1860d0204c (diff)
Use 'Destroy(Context)' instead of 'Context.Deallocate()' (does recursive freeing of memory).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63998 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaType.cpp')
-rw-r--r--lib/Sema/SemaType.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp
index e206c40c3b..d31402de71 100644
--- a/lib/Sema/SemaType.cpp
+++ b/lib/Sema/SemaType.cpp
@@ -424,10 +424,7 @@ QualType Sema::GetTypeForDeclarator(Declarator &D, Scope *S, unsigned Skip) {
Diag(ArraySize->getLocStart(), diag::err_array_size_non_int)
<< ArraySize->getType() << ArraySize->getSourceRange();
D.setInvalidType(true);
-
- Context.Deallocate(ArraySize);
- ArraySize->~Expr();
-
+ ArraySize->Destroy(Context);
ATI.NumElts = ArraySize = 0;
}
llvm::APSInt ConstVal(32);