Some utilities for using the smart pointers in Actions, especially Sema. Convert a few functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60983 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index 97e8507..3a64486 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -39,6 +39,7 @@
   class DeclSpec;
   class NamedDecl;
   class ScopedDecl;
+  class Stmt;
   class Expr;
   class InitListExpr;
   class CallExpr;
@@ -242,6 +243,9 @@
   virtual void DeleteExpr(ExprTy *E);
   virtual void DeleteStmt(StmtTy *S);
 
+  OwningExprResult Owned(Expr* E) { return OwningExprResult(*this, E); }
+  OwningStmtResult Owned(Stmt* S) { return OwningStmtResult(*this, S); }
+
   virtual void ActOnEndOfTranslationUnit();
   
   //===--------------------------------------------------------------------===//
@@ -268,7 +272,7 @@
   virtual void ActOnParamDefaultArgument(DeclTy *param, 
                                          SourceLocation EqualLoc,
                                          ExprTy *defarg);
-  void AddInitializerToDecl(DeclTy *dcl, ExprTy *init);
+  void AddInitializerToDecl(DeclTy *dcl, ExprArg init);
   void ActOnUninitializedDecl(DeclTy *dcl);
   virtual DeclTy *FinalizeDeclaratorGroup(Scope *S, DeclTy *Group);
 
@@ -276,11 +280,11 @@
   virtual DeclTy *ActOnStartOfFunctionDef(Scope *S, DeclTy *D);
   virtual void ObjCActOnStartOfMethodDef(Scope *S, DeclTy *D);
   
-  virtual DeclTy *ActOnFinishFunctionBody(DeclTy *Decl, StmtTy *Body);
+  virtual DeclTy *ActOnFinishFunctionBody(DeclTy *Decl, StmtArg Body);
   virtual DeclTy *ActOnLinkageSpec(SourceLocation Loc, SourceLocation LBrace,
                                    SourceLocation RBrace, const char *Lang,
                                    unsigned StrSize, DeclTy *D);
-  virtual DeclTy *ActOnFileScopeAsmDecl(SourceLocation Loc, ExprTy *expr);
+  virtual DeclTy *ActOnFileScopeAsmDecl(SourceLocation Loc, ExprArg expr);
 
   /// Scope actions.
   virtual void ActOnPopScope(SourceLocation Loc, Scope *S);