]> granicus.if.org Git - clang/commitdiff
Destroy the inheritance path.
authorAnders Carlsson <andersca@mac.com>
Fri, 23 Apr 2010 21:02:34 +0000 (21:02 +0000)
committerAnders Carlsson <andersca@mac.com>
Fri, 23 Apr 2010 21:02:34 +0000 (21:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102211 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Expr.h
lib/AST/Expr.cpp

index be1246cfc532317fd9c6864d2953c7010a78e6b7..31a421fb0e0dca8cd31f391e2472add177f12517 100644 (file)
@@ -1710,6 +1710,8 @@ protected:
   CastExpr(StmtClass SC, EmptyShell Empty)
     : Expr(SC, Empty) { }
 
+  virtual void DoDestroy(ASTContext &C);
+
 public:
   CastKind getCastKind() const { return Kind; }
   void setCastKind(CastKind K) { Kind = K; }
index 036d5ef680ef2fb79010666f2e8f3db330b2ca07..370f33fbf3376e34f2539ce67a88ea143aba77d8 100644 (file)
@@ -652,6 +652,13 @@ const char *CastExpr::getCastKindName() const {
   return 0;
 }
 
+void CastExpr::DoDestroy(ASTContext &C)
+{
+  if (InheritancePath)
+    InheritancePath->Destroy();
+  Expr::DoDestroy(C);
+}
+
 Expr *CastExpr::getSubExprAsWritten() {
   Expr *SubExpr = 0;
   CastExpr *E = this;