Author: kremenek
Date: Fri Feb  6 19:51:40 2009
New Revision: 63998

URL: http://llvm.org/viewvc/llvm-project?rev=63998&view=rev
Log:
Use 'Destroy(Context)' instead of 'Context.Deallocate()' (does recursive 
freeing of memory).

Modified:
    cfe/trunk/lib/Sema/SemaType.cpp

Modified: cfe/trunk/lib/Sema/SemaType.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaType.cpp?rev=63998&r1=63997&r2=63998&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaType.cpp (original)
+++ cfe/trunk/lib/Sema/SemaType.cpp Fri Feb  6 19:51:40 2009
@@ -424,10 +424,7 @@
         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);


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to