[cfe-commits] r102211 - in /cfe/trunk: include/clang/AST/Expr.h lib/AST/Expr.cpp

Anders Carlsson andersca at mac.com
Fri Apr 23 14:02:34 PDT 2010


Author: andersca
Date: Fri Apr 23 16:02:34 2010
New Revision: 102211

URL: http://llvm.org/viewvc/llvm-project?rev=102211&view=rev
Log:
Destroy the inheritance path.

Modified:
    cfe/trunk/include/clang/AST/Expr.h
    cfe/trunk/lib/AST/Expr.cpp

Modified: cfe/trunk/include/clang/AST/Expr.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Expr.h?rev=102211&r1=102210&r2=102211&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Expr.h (original)
+++ cfe/trunk/include/clang/AST/Expr.h Fri Apr 23 16:02:34 2010
@@ -1710,6 +1710,8 @@
   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; }

Modified: cfe/trunk/lib/AST/Expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Expr.cpp?rev=102211&r1=102210&r2=102211&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Expr.cpp (original)
+++ cfe/trunk/lib/AST/Expr.cpp Fri Apr 23 16:02:34 2010
@@ -652,6 +652,13 @@
   return 0;
 }
 
+void CastExpr::DoDestroy(ASTContext &C)
+{
+  if (InheritancePath)
+    InheritancePath->Destroy();
+  Expr::DoDestroy(C);
+}
+
 Expr *CastExpr::getSubExprAsWritten() {
   Expr *SubExpr = 0;
   CastExpr *E = this;





More information about the cfe-commits mailing list