Lay the groundwork for converting the entire parser-sema chain to smart pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60782 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/AstGuard.h b/lib/Parse/AstGuard.h
index 0aae4c0..71d2565 100644
--- a/lib/Parse/AstGuard.h
+++ b/lib/Parse/AstGuard.h
@@ -19,11 +19,11 @@
 
 namespace clang
 {
-  template <void (Action::*Destroyer)(void*)>
+  template <void (ActionBase::*Destroyer)(void*)>
   class ASTOwner;
 
-  typedef ASTOwner<&Action::DeleteStmt> StmtOwner;
-  typedef ASTOwner<&Action::DeleteExpr> ExprOwner;
+  typedef ASTOwner<&ActionBase::DeleteStmt> StmtOwner;
+  typedef ASTOwner<&ActionBase::DeleteExpr> ExprOwner;
 
   /// Some trickery to switch between an ActionResult and an ASTOwner
   template <typename Owner> struct ResultOfOwner;
@@ -36,7 +36,7 @@
 
   /// Move emulation helper for ASTOwner. Implicitly convertible to ActionResult
   /// and void*, which means ASTOwner::move() can be used universally.
-  template <void (Action::*Destroyer)(void*)>
+  template <void (ActionBase::*Destroyer)(void*)>
   class ASTMove {
     ASTOwner<Destroyer> &Moved;
 
@@ -62,7 +62,7 @@
   };
 
   /// RAII owning pointer for StmtTys and ExprTys. Simple move emulation.
-  template <void (Action::*Destroyer)(void*)>
+  template <void (ActionBase::*Destroyer)(void*)>
   class ASTOwner {
     typedef typename ResultOfOwner<ASTOwner>::type Result;
 
@@ -136,7 +136,7 @@
   /// automatically freeing them on destruction unless it's been disowned.
   /// Instantiated for statements and expressions (Action::DeleteStmt and
   /// Action::DeleteExpr).
-  template <void (Action::*Destroyer)(void*), unsigned N>
+  template <void (ActionBase::*Destroyer)(void*), unsigned N>
   class ASTVector : public llvm::SmallVector<void*, N> {
   private:
     Action &Actions;
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp
index f2d0ce4..3a3b9d8 100644
--- a/lib/Parse/Parser.cpp
+++ b/lib/Parse/Parser.cpp
@@ -39,6 +39,9 @@
 }
 
 ///  Out-of-line virtual destructor to provide home for Action class.
+ActionBase::~ActionBase() {}
+
+///  Out-of-line virtual destructor to provide home for Action class.
 Action::~Action() {}