[cfe-commits] r111903 - in /cfe/trunk: include/clang/Parse/ include/clang/Sema/ lib/Parse/ lib/Sema/

John McCall rjmccall at apple.com
Mon Aug 23 23:29:42 PDT 2010


Author: rjmccall
Date: Tue Aug 24 01:29:42 2010
New Revision: 111903

URL: http://llvm.org/viewvc/llvm-project?rev=111903&view=rev
Log:
OwningExprResult -> ExprResult.  This patch brought to you by
M-x query-replace-regexp
\(Sema::\|Action::\|Parser::\|\)Owning\(Expr\|Stmt\)Result -> \2Result


Modified:
    cfe/trunk/include/clang/Parse/Parser.h
    cfe/trunk/include/clang/Sema/Action.h
    cfe/trunk/include/clang/Sema/Initialization.h
    cfe/trunk/include/clang/Sema/Ownership.h
    cfe/trunk/include/clang/Sema/Sema.h
    cfe/trunk/lib/Parse/ParseCXXInlineMethods.cpp
    cfe/trunk/lib/Parse/ParseDecl.cpp
    cfe/trunk/lib/Parse/ParseDeclCXX.cpp
    cfe/trunk/lib/Parse/ParseExpr.cpp
    cfe/trunk/lib/Parse/ParseExprCXX.cpp
    cfe/trunk/lib/Parse/ParseInit.cpp
    cfe/trunk/lib/Parse/ParseObjc.cpp
    cfe/trunk/lib/Parse/ParsePragma.cpp
    cfe/trunk/lib/Parse/ParseStmt.cpp
    cfe/trunk/lib/Parse/ParseTemplate.cpp
    cfe/trunk/lib/Parse/Parser.cpp
    cfe/trunk/lib/Sema/SemaCXXCast.cpp
    cfe/trunk/lib/Sema/SemaChecking.cpp
    cfe/trunk/lib/Sema/SemaCodeComplete.cpp
    cfe/trunk/lib/Sema/SemaDecl.cpp
    cfe/trunk/lib/Sema/SemaDeclCXX.cpp
    cfe/trunk/lib/Sema/SemaExpr.cpp
    cfe/trunk/lib/Sema/SemaExprCXX.cpp
    cfe/trunk/lib/Sema/SemaExprObjC.cpp
    cfe/trunk/lib/Sema/SemaInit.cpp
    cfe/trunk/lib/Sema/SemaObjCProperty.cpp
    cfe/trunk/lib/Sema/SemaOverload.cpp
    cfe/trunk/lib/Sema/SemaStmt.cpp
    cfe/trunk/lib/Sema/SemaTemplate.cpp
    cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp
    cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp
    cfe/trunk/lib/Sema/TreeTransform.h

Modified: cfe/trunk/include/clang/Parse/Parser.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/Parser.h?rev=111903&r1=111902&r2=111903&view=diff
==============================================================================
--- cfe/trunk/include/clang/Parse/Parser.h (original)
+++ cfe/trunk/include/clang/Parse/Parser.h Tue Aug 24 01:29:42 2010
@@ -163,29 +163,26 @@
   typedef clang::MemInitResult     MemInitResult;
   typedef clang::TypeResult        TypeResult;
 
-  typedef clang::OwningExprResult OwningExprResult;
-  typedef clang::OwningStmtResult OwningStmtResult;
-
   typedef Expr *ExprArg;
   typedef ASTMultiPtr<Stmt*> MultiStmtArg;
   typedef Action::FullExprArg FullExprArg;
 
-  /// Adorns a ExprResult with Actions to make it an OwningExprResult
-  OwningExprResult Owned(ExprResult res) {
-    return OwningExprResult(res);
+  /// Adorns a ExprResult with Actions to make it an ExprResult
+  ExprResult Owned(ExprResult res) {
+    return ExprResult(res);
   }
-  /// Adorns a StmtResult with Actions to make it an OwningStmtResult
-  OwningStmtResult Owned(StmtResult res) {
-    return OwningStmtResult(res);
+  /// Adorns a StmtResult with Actions to make it an StmtResult
+  StmtResult Owned(StmtResult res) {
+    return StmtResult(res);
   }
 
-  OwningExprResult ExprError() { return OwningExprResult(true); }
-  OwningStmtResult StmtError() { return OwningStmtResult(true); }
+  ExprResult ExprError() { return ExprResult(true); }
+  StmtResult StmtError() { return StmtResult(true); }
 
-  OwningExprResult ExprError(const DiagnosticBuilder &) { return ExprError(); }
-  OwningStmtResult StmtError(const DiagnosticBuilder &) { return StmtError(); }
+  ExprResult ExprError(const DiagnosticBuilder &) { return ExprError(); }
+  StmtResult StmtError(const DiagnosticBuilder &) { return StmtError(); }
 
-  OwningExprResult ExprEmpty() { return OwningExprResult(false); }
+  ExprResult ExprEmpty() { return ExprResult(false); }
 
   // Parsing methods.
 
@@ -876,8 +873,8 @@
   void ParseKNRParamDeclarations(Declarator &D);
   // EndLoc, if non-NULL, is filled with the location of the last token of
   // the simple-asm.
-  OwningExprResult ParseSimpleAsm(SourceLocation *EndLoc = 0);
-  OwningExprResult ParseAsmStringLiteral();
+  ExprResult ParseSimpleAsm(SourceLocation *EndLoc = 0);
+  ExprResult ParseAsmStringLiteral();
 
   // Objective-C External Declarations
   Decl *ParseObjCAtDirectives();
@@ -931,29 +928,29 @@
   //===--------------------------------------------------------------------===//
   // C99 6.5: Expressions.
   
-  OwningExprResult ParseExpression();
-  OwningExprResult ParseConstantExpression();
+  ExprResult ParseExpression();
+  ExprResult ParseConstantExpression();
   // Expr that doesn't include commas.
-  OwningExprResult ParseAssignmentExpression();
+  ExprResult ParseAssignmentExpression();
 
-  OwningExprResult ParseExpressionWithLeadingAt(SourceLocation AtLoc);
+  ExprResult ParseExpressionWithLeadingAt(SourceLocation AtLoc);
 
-  OwningExprResult ParseExpressionWithLeadingExtension(SourceLocation ExtLoc);
+  ExprResult ParseExpressionWithLeadingExtension(SourceLocation ExtLoc);
 
-  OwningExprResult ParseRHSOfBinaryExpression(OwningExprResult LHS,
+  ExprResult ParseRHSOfBinaryExpression(ExprResult LHS,
                                               prec::Level MinPrec);
-  OwningExprResult ParseCastExpression(bool isUnaryExpression,
+  ExprResult ParseCastExpression(bool isUnaryExpression,
                                        bool isAddressOfOperand,
                                        bool &NotCastExpr,
                                        ParsedType TypeOfCast);
-  OwningExprResult ParseCastExpression(bool isUnaryExpression,
+  ExprResult ParseCastExpression(bool isUnaryExpression,
                                        bool isAddressOfOperand = false,
                                        ParsedType TypeOfCast = ParsedType());
-  OwningExprResult ParsePostfixExpressionSuffix(OwningExprResult LHS);
-  OwningExprResult ParseSizeofAlignofExpression();
-  OwningExprResult ParseBuiltinPrimaryExpression();
+  ExprResult ParsePostfixExpressionSuffix(ExprResult LHS);
+  ExprResult ParseSizeofAlignofExpression();
+  ExprResult ParseBuiltinPrimaryExpression();
 
-  OwningExprResult ParseExprAfterTypeofSizeofAlignof(const Token &OpTok,
+  ExprResult ParseExprAfterTypeofSizeofAlignof(const Token &OpTok,
                                                      bool &isCastExpr,
                                                      ParsedType &CastTy,
                                                      SourceRange &CastRange);
@@ -977,26 +974,26 @@
     CompoundLiteral, // Also allow '(' type-name ')' '{' ... '}'
     CastExpr         // Also allow '(' type-name ')' <anything>
   };
-  OwningExprResult ParseParenExpression(ParenParseOption &ExprType,
+  ExprResult ParseParenExpression(ParenParseOption &ExprType,
                                         bool stopIfCastExpr,
                                         ParsedType TypeOfCast,
                                         ParsedType &CastTy,
                                         SourceLocation &RParenLoc);
 
-  OwningExprResult ParseCXXAmbiguousParenExpression(ParenParseOption &ExprType,
+  ExprResult ParseCXXAmbiguousParenExpression(ParenParseOption &ExprType,
                                                     ParsedType &CastTy,
                                                     SourceLocation LParenLoc,
                                                     SourceLocation &RParenLoc);
 
-  OwningExprResult ParseCompoundLiteralExpression(ParsedType Ty,
+  ExprResult ParseCompoundLiteralExpression(ParsedType Ty,
                                                   SourceLocation LParenLoc,
                                                   SourceLocation RParenLoc);
 
-  OwningExprResult ParseStringLiteralExpression();
+  ExprResult ParseStringLiteralExpression();
 
   //===--------------------------------------------------------------------===//
   // C++ Expressions
-  OwningExprResult ParseCXXIdExpression(bool isAddressOfOperand = false);
+  ExprResult ParseCXXIdExpression(bool isAddressOfOperand = false);
 
   bool ParseOptionalCXXScopeSpecifier(CXXScopeSpec &SS,
                                       ParsedType ObjectType,
@@ -1005,26 +1002,26 @@
 
   //===--------------------------------------------------------------------===//
   // C++ 5.2p1: C++ Casts
-  OwningExprResult ParseCXXCasts();
+  ExprResult ParseCXXCasts();
 
   //===--------------------------------------------------------------------===//
   // C++ 5.2p1: C++ Type Identification
-  OwningExprResult ParseCXXTypeid();
+  ExprResult ParseCXXTypeid();
 
   //===--------------------------------------------------------------------===//
   // C++ 5.2.4: C++ Pseudo-Destructor Expressions
-  OwningExprResult ParseCXXPseudoDestructor(ExprArg Base, SourceLocation OpLoc,
+  ExprResult ParseCXXPseudoDestructor(ExprArg Base, SourceLocation OpLoc,
                                             tok::TokenKind OpKind,
                                             CXXScopeSpec &SS,
                                             ParsedType ObjectType);
 
   //===--------------------------------------------------------------------===//
   // C++ 9.3.2: C++ 'this' pointer
-  OwningExprResult ParseCXXThis();
+  ExprResult ParseCXXThis();
 
   //===--------------------------------------------------------------------===//
   // C++ 15: C++ Throw Expression
-  OwningExprResult ParseThrowExpression();
+  ExprResult ParseThrowExpression();
   // EndLoc is filled with the location of the last token of the specification.
   bool ParseExceptionSpecification(SourceLocation &EndLoc,
                                    llvm::SmallVectorImpl<ParsedType> &Exns,
@@ -1033,11 +1030,11 @@
 
   //===--------------------------------------------------------------------===//
   // C++ 2.13.5: C++ Boolean Literals
-  OwningExprResult ParseCXXBoolLiteral();
+  ExprResult ParseCXXBoolLiteral();
 
   //===--------------------------------------------------------------------===//
   // C++ 5.2.3: Explicit type conversion (functional notation)
-  OwningExprResult ParseCXXTypeConstructExpression(const DeclSpec &DS);
+  ExprResult ParseCXXTypeConstructExpression(const DeclSpec &DS);
 
   bool isCXXSimpleTypeSpecifier() const;
 
@@ -1053,13 +1050,13 @@
   bool ParseExpressionListOrTypeId(llvm::SmallVectorImpl<Expr*> &Exprs,
                                    Declarator &D);
   void ParseDirectNewDeclarator(Declarator &D);
-  OwningExprResult ParseCXXNewExpression(bool UseGlobal, SourceLocation Start);
-  OwningExprResult ParseCXXDeleteExpression(bool UseGlobal,
+  ExprResult ParseCXXNewExpression(bool UseGlobal, SourceLocation Start);
+  ExprResult ParseCXXDeleteExpression(bool UseGlobal,
                                             SourceLocation Start);
 
   //===--------------------------------------------------------------------===//
   // C++ if/switch/while condition expression.
-  bool ParseCXXCondition(OwningExprResult &ExprResult, Decl *&DeclResult,
+  bool ParseCXXCondition(ExprResult &ExprResult, Decl *&DeclResult,
                          SourceLocation Loc, bool ConvertToBoolean);
 
   //===--------------------------------------------------------------------===//
@@ -1072,33 +1069,33 @@
   ///       initializer: [C99 6.7.8]
   ///         assignment-expression
   ///         '{' ...
-  OwningExprResult ParseInitializer() {
+  ExprResult ParseInitializer() {
     if (Tok.isNot(tok::l_brace))
       return ParseAssignmentExpression();
     return ParseBraceInitializer();
   }
-  OwningExprResult ParseBraceInitializer();
-  OwningExprResult ParseInitializerWithPotentialDesignator();
+  ExprResult ParseBraceInitializer();
+  ExprResult ParseInitializerWithPotentialDesignator();
 
   //===--------------------------------------------------------------------===//
   // clang Expressions
 
-  OwningExprResult ParseBlockLiteralExpression();  // ^{...}
+  ExprResult ParseBlockLiteralExpression();  // ^{...}
 
   //===--------------------------------------------------------------------===//
   // Objective-C Expressions
-  OwningExprResult ParseObjCAtExpression(SourceLocation AtLocation);
-  OwningExprResult ParseObjCStringLiteral(SourceLocation AtLoc);
-  OwningExprResult ParseObjCEncodeExpression(SourceLocation AtLoc);
-  OwningExprResult ParseObjCSelectorExpression(SourceLocation AtLoc);
-  OwningExprResult ParseObjCProtocolExpression(SourceLocation AtLoc);
+  ExprResult ParseObjCAtExpression(SourceLocation AtLocation);
+  ExprResult ParseObjCStringLiteral(SourceLocation AtLoc);
+  ExprResult ParseObjCEncodeExpression(SourceLocation AtLoc);
+  ExprResult ParseObjCSelectorExpression(SourceLocation AtLoc);
+  ExprResult ParseObjCProtocolExpression(SourceLocation AtLoc);
   bool isSimpleObjCMessageExpression();
-  OwningExprResult ParseObjCMessageExpression();
-  OwningExprResult ParseObjCMessageExpressionBody(SourceLocation LBracloc,
+  ExprResult ParseObjCMessageExpression();
+  ExprResult ParseObjCMessageExpressionBody(SourceLocation LBracloc,
                                                   SourceLocation SuperLoc,
                                                   ParsedType ReceiverType,
                                                   ExprArg ReceiverExpr);
-  OwningExprResult ParseAssignmentExprWithObjCMessageExprStart(
+  ExprResult ParseAssignmentExprWithObjCMessageExprStart(
       SourceLocation LBracloc, SourceLocation SuperLoc,
       ParsedType ReceiverType, ExprArg ReceiverExpr);
   bool ParseObjCXXMessageReceiver(bool &IsExpr, void *&TypeOrExpr);
@@ -1106,31 +1103,31 @@
   //===--------------------------------------------------------------------===//
   // C99 6.8: Statements and Blocks.
 
-  OwningStmtResult ParseStatement() {
+  StmtResult ParseStatement() {
     return ParseStatementOrDeclaration(true);
   }
-  OwningStmtResult ParseStatementOrDeclaration(bool OnlyStatement = false);
-  OwningStmtResult ParseLabeledStatement(AttributeList *Attr);
-  OwningStmtResult ParseCaseStatement(AttributeList *Attr);
-  OwningStmtResult ParseDefaultStatement(AttributeList *Attr);
-  OwningStmtResult ParseCompoundStatement(AttributeList *Attr,
+  StmtResult ParseStatementOrDeclaration(bool OnlyStatement = false);
+  StmtResult ParseLabeledStatement(AttributeList *Attr);
+  StmtResult ParseCaseStatement(AttributeList *Attr);
+  StmtResult ParseDefaultStatement(AttributeList *Attr);
+  StmtResult ParseCompoundStatement(AttributeList *Attr,
                                           bool isStmtExpr = false);
-  OwningStmtResult ParseCompoundStatementBody(bool isStmtExpr = false);
-  bool ParseParenExprOrCondition(OwningExprResult &ExprResult,
+  StmtResult ParseCompoundStatementBody(bool isStmtExpr = false);
+  bool ParseParenExprOrCondition(ExprResult &ExprResult,
                                  Decl *&DeclResult,
                                  SourceLocation Loc,
                                  bool ConvertToBoolean);
-  OwningStmtResult ParseIfStatement(AttributeList *Attr);
-  OwningStmtResult ParseSwitchStatement(AttributeList *Attr);
-  OwningStmtResult ParseWhileStatement(AttributeList *Attr);
-  OwningStmtResult ParseDoStatement(AttributeList *Attr);
-  OwningStmtResult ParseForStatement(AttributeList *Attr);
-  OwningStmtResult ParseGotoStatement(AttributeList *Attr);
-  OwningStmtResult ParseContinueStatement(AttributeList *Attr);
-  OwningStmtResult ParseBreakStatement(AttributeList *Attr);
-  OwningStmtResult ParseReturnStatement(AttributeList *Attr);
-  OwningStmtResult ParseAsmStatement(bool &msAsm);
-  OwningStmtResult FuzzyParseMicrosoftAsmStatement();
+  StmtResult ParseIfStatement(AttributeList *Attr);
+  StmtResult ParseSwitchStatement(AttributeList *Attr);
+  StmtResult ParseWhileStatement(AttributeList *Attr);
+  StmtResult ParseDoStatement(AttributeList *Attr);
+  StmtResult ParseForStatement(AttributeList *Attr);
+  StmtResult ParseGotoStatement(AttributeList *Attr);
+  StmtResult ParseContinueStatement(AttributeList *Attr);
+  StmtResult ParseBreakStatement(AttributeList *Attr);
+  StmtResult ParseReturnStatement(AttributeList *Attr);
+  StmtResult ParseAsmStatement(bool &msAsm);
+  StmtResult FuzzyParseMicrosoftAsmStatement();
   bool ParseAsmOperandsOpt(llvm::SmallVectorImpl<IdentifierInfo *> &Names,
                            llvm::SmallVectorImpl<ExprTy *> &Constraints,
                            llvm::SmallVectorImpl<ExprTy *> &Exprs);
@@ -1138,17 +1135,17 @@
   //===--------------------------------------------------------------------===//
   // C++ 6: Statements and Blocks
 
-  OwningStmtResult ParseCXXTryBlock(AttributeList *Attr);
-  OwningStmtResult ParseCXXTryBlockCommon(SourceLocation TryLoc);
-  OwningStmtResult ParseCXXCatchBlock();
+  StmtResult ParseCXXTryBlock(AttributeList *Attr);
+  StmtResult ParseCXXTryBlockCommon(SourceLocation TryLoc);
+  StmtResult ParseCXXCatchBlock();
 
   //===--------------------------------------------------------------------===//
   // Objective-C Statements
 
-  OwningStmtResult ParseObjCAtStatement(SourceLocation atLoc);
-  OwningStmtResult ParseObjCTryStmt(SourceLocation atLoc);
-  OwningStmtResult ParseObjCThrowStmt(SourceLocation atLoc);
-  OwningStmtResult ParseObjCSynchronizedStmt(SourceLocation atLoc);
+  StmtResult ParseObjCAtStatement(SourceLocation atLoc);
+  StmtResult ParseObjCTryStmt(SourceLocation atLoc);
+  StmtResult ParseObjCThrowStmt(SourceLocation atLoc);
+  StmtResult ParseObjCSynchronizedStmt(SourceLocation atLoc);
 
 
   //===--------------------------------------------------------------------===//
@@ -1358,7 +1355,7 @@
   void ParseTypeofSpecifier(DeclSpec &DS);
   void ParseDecltypeSpecifier(DeclSpec &DS);
   
-  OwningExprResult ParseCXX0XAlignArgument(SourceLocation Start);
+  ExprResult ParseCXX0XAlignArgument(SourceLocation Start);
 
   /// DeclaratorScopeObj - RAII object used in Parser::ParseDirectDeclarator to
   /// enter a new C++ declarator scope and exit it when the function is
@@ -1530,7 +1527,7 @@
 
   //===--------------------------------------------------------------------===//
   // GNU G++: Type Traits [Type-Traits.html in the GCC manual]
-  OwningExprResult ParseUnaryTypeTrait();
+  ExprResult ParseUnaryTypeTrait();
 };
 
 }  // end namespace clang

Modified: cfe/trunk/include/clang/Sema/Action.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Action.h?rev=111903&r1=111902&r2=111903&view=diff
==============================================================================
--- cfe/trunk/include/clang/Sema/Action.h (original)
+++ cfe/trunk/include/clang/Sema/Action.h Tue Aug 24 01:29:42 2010
@@ -99,12 +99,6 @@
   typedef clang::DeclResult DeclResult;
   typedef clang::MemInitResult MemInitResult;
 
-  /// Same, but with ownership.
-  typedef clang::OwningExprResult OwningExprResult;
-  typedef clang::OwningStmtResult OwningStmtResult;
-  // Note that these will replace ExprResult and StmtResult when the transition
-  // is complete.
-
   /// Single expressions or statements as arguments.
   typedef Expr *ExprArg;
   typedef Stmt *StmtArg;
@@ -123,7 +117,7 @@
     // emulation code from Ownership.h).
     FullExprArg(const FullExprArg& Other): E(Other.E) {}
 
-    OwningExprResult release() {
+    ExprResult release() {
       return move(E);
     }
 
@@ -149,14 +143,14 @@
 
   // Utilities for Action implementations to return smart results.
 
-  OwningExprResult ExprError() { return OwningExprResult(true); }
-  OwningStmtResult StmtError() { return OwningStmtResult(true); }
+  ExprResult ExprError() { return ExprResult(true); }
+  StmtResult StmtError() { return StmtResult(true); }
 
-  OwningExprResult ExprError(const DiagnosticBuilder&) { return ExprError(); }
-  OwningStmtResult StmtError(const DiagnosticBuilder&) { return StmtError(); }
+  ExprResult ExprError(const DiagnosticBuilder&) { return ExprError(); }
+  StmtResult StmtError(const DiagnosticBuilder&) { return StmtError(); }
 
-  OwningExprResult ExprEmpty() { return OwningExprResult(false); }
-  OwningStmtResult StmtEmpty() { return OwningStmtResult(false); }
+  ExprResult ExprEmpty() { return ExprResult(false); }
+  StmtResult StmtEmpty() { return StmtResult(false); }
 
   /// Statistics.
   virtual void PrintStats() const {}
@@ -774,16 +768,16 @@
   // Statement Parsing Callbacks.
   //===--------------------------------------------------------------------===//
 
-  virtual OwningStmtResult ActOnNullStmt(SourceLocation SemiLoc) {
+  virtual StmtResult ActOnNullStmt(SourceLocation SemiLoc) {
     return StmtEmpty();
   }
 
-  virtual OwningStmtResult ActOnCompoundStmt(SourceLocation L, SourceLocation R,
+  virtual StmtResult ActOnCompoundStmt(SourceLocation L, SourceLocation R,
                                              MultiStmtArg Elts,
                                              bool isStmtExpr) {
     return StmtEmpty();
   }
-  virtual OwningStmtResult ActOnDeclStmt(DeclGroupPtrTy Decl,
+  virtual StmtResult ActOnDeclStmt(DeclGroupPtrTy Decl,
                                          SourceLocation StartLoc,
                                          SourceLocation EndLoc) {
     return StmtEmpty();
@@ -792,12 +786,12 @@
   virtual void ActOnForEachDeclStmt(DeclGroupPtrTy Decl) {
   }
 
-  virtual OwningStmtResult ActOnExprStmt(FullExprArg Expr)  = 0;
+  virtual StmtResult ActOnExprStmt(FullExprArg Expr)  = 0;
 
   /// ActOnCaseStmt - Note that this handles the GNU 'case 1 ... 4' extension,
   /// which can specify an RHS value.  The sub-statement of the case is
   /// specified in a separate action.
-  virtual OwningStmtResult ActOnCaseStmt(SourceLocation CaseLoc, ExprArg LHSVal,
+  virtual StmtResult ActOnCaseStmt(SourceLocation CaseLoc, ExprArg LHSVal,
                                          SourceLocation DotDotDotLoc,
                                          ExprArg RHSVal,
                                          SourceLocation ColonLoc) {
@@ -807,13 +801,13 @@
   /// ActOnCaseStmtBody - This installs a statement as the body of a case.
   virtual void ActOnCaseStmtBody(StmtTy *CaseStmt, StmtArg SubStmt) {}
 
-  virtual OwningStmtResult ActOnDefaultStmt(SourceLocation DefaultLoc,
+  virtual StmtResult ActOnDefaultStmt(SourceLocation DefaultLoc,
                                             SourceLocation ColonLoc,
                                             StmtArg SubStmt, Scope *CurScope){
     return StmtEmpty();
   }
 
-  virtual OwningStmtResult ActOnLabelStmt(SourceLocation IdentLoc,
+  virtual StmtResult ActOnLabelStmt(SourceLocation IdentLoc,
                                           IdentifierInfo *II,
                                           SourceLocation ColonLoc,
                                           StmtArg SubStmt) {
@@ -835,7 +829,7 @@
   /// \param ElseLoc the location of the "else" keyword.
   ///
   /// \param ElseVal the "else" statement.
-  virtual OwningStmtResult ActOnIfStmt(SourceLocation IfLoc,
+  virtual StmtResult ActOnIfStmt(SourceLocation IfLoc,
                                        FullExprArg CondVal, 
                                        Decl *CondVar,
                                        StmtArg ThenVal,
@@ -853,13 +847,13 @@
   ///
   /// \param CondVar if the "switch" condition was parsed as a condition 
   /// variable, the condition variable itself.
-  virtual OwningStmtResult ActOnStartOfSwitchStmt(SourceLocation SwitchLoc,
+  virtual StmtResult ActOnStartOfSwitchStmt(SourceLocation SwitchLoc,
                                                   ExprArg Cond,
                                                   Decl *CondVar) {
     return StmtEmpty();
   }
 
-  virtual OwningStmtResult ActOnFinishSwitchStmt(SourceLocation SwitchLoc,
+  virtual StmtResult ActOnFinishSwitchStmt(SourceLocation SwitchLoc,
                                                  StmtArg Switch, StmtArg Body) {
     return StmtEmpty();
   }
@@ -873,12 +867,12 @@
   /// variable, the condition variable itself.
   ///
   /// \param Body the body of the "while" loop.
-  virtual OwningStmtResult ActOnWhileStmt(SourceLocation WhileLoc,
+  virtual StmtResult ActOnWhileStmt(SourceLocation WhileLoc,
                                           FullExprArg Cond, Decl *CondVar,
                                           StmtArg Body) {
     return StmtEmpty();
   }
-  virtual OwningStmtResult ActOnDoStmt(SourceLocation DoLoc, StmtArg Body,
+  virtual StmtResult ActOnDoStmt(SourceLocation DoLoc, StmtArg Body,
                                        SourceLocation WhileLoc,
                                        SourceLocation CondLParen,
                                        ExprArg Cond,
@@ -906,7 +900,7 @@
   /// \param RParenLoc the location of the right parentheses.
   ///
   /// \param Body the body of the "body" loop.
-  virtual OwningStmtResult ActOnForStmt(SourceLocation ForLoc,
+  virtual StmtResult ActOnForStmt(SourceLocation ForLoc,
                                         SourceLocation LParenLoc,
                                         StmtArg First, FullExprArg Second,
                                         Decl *SecondVar, FullExprArg Third, 
@@ -915,35 +909,35 @@
     return StmtEmpty();
   }
   
-  virtual OwningStmtResult ActOnObjCForCollectionStmt(SourceLocation ForColLoc,
+  virtual StmtResult ActOnObjCForCollectionStmt(SourceLocation ForColLoc,
                                        SourceLocation LParenLoc,
                                        StmtArg First, ExprArg Second,
                                        SourceLocation RParenLoc, StmtArg Body) {
     return StmtEmpty();
   }
-  virtual OwningStmtResult ActOnGotoStmt(SourceLocation GotoLoc,
+  virtual StmtResult ActOnGotoStmt(SourceLocation GotoLoc,
                                          SourceLocation LabelLoc,
                                          IdentifierInfo *LabelII) {
     return StmtEmpty();
   }
-  virtual OwningStmtResult ActOnIndirectGotoStmt(SourceLocation GotoLoc,
+  virtual StmtResult ActOnIndirectGotoStmt(SourceLocation GotoLoc,
                                                  SourceLocation StarLoc,
                                                  ExprArg DestExp) {
     return StmtEmpty();
   }
-  virtual OwningStmtResult ActOnContinueStmt(SourceLocation ContinueLoc,
+  virtual StmtResult ActOnContinueStmt(SourceLocation ContinueLoc,
                                              Scope *CurScope) {
     return StmtEmpty();
   }
-  virtual OwningStmtResult ActOnBreakStmt(SourceLocation GotoLoc,
+  virtual StmtResult ActOnBreakStmt(SourceLocation GotoLoc,
                                           Scope *CurScope) {
     return StmtEmpty();
   }
-  virtual OwningStmtResult ActOnReturnStmt(SourceLocation ReturnLoc,
+  virtual StmtResult ActOnReturnStmt(SourceLocation ReturnLoc,
                                            ExprArg RetValExp) {
     return StmtEmpty();
   }
-  virtual OwningStmtResult ActOnAsmStmt(SourceLocation AsmLoc,
+  virtual StmtResult ActOnAsmStmt(SourceLocation AsmLoc,
                                         bool IsSimple,
                                         bool IsVolatile,
                                         unsigned NumOutputs,
@@ -971,7 +965,7 @@
   /// this is a @catch(...) block.
   ///
   /// \param Body The body of the @catch block.
-  virtual OwningStmtResult ActOnObjCAtCatchStmt(SourceLocation AtLoc,
+  virtual StmtResult ActOnObjCAtCatchStmt(SourceLocation AtLoc,
                                                 SourceLocation RParen,
                                                 Decl *Parm, StmtArg Body) {
     return StmtEmpty();
@@ -982,7 +976,7 @@
   /// \param AtLoc The location of the '@' starting the '@finally'.
   ///
   /// \param Body The body of the @finally block.
-  virtual OwningStmtResult ActOnObjCAtFinallyStmt(SourceLocation AtLoc,
+  virtual StmtResult ActOnObjCAtFinallyStmt(SourceLocation AtLoc,
                                                   StmtArg Body) {
     return StmtEmpty();
   }
@@ -996,20 +990,20 @@
   /// \param CatchStmts The @catch statements.
   ///
   /// \param Finally The @finally statement.
-  virtual OwningStmtResult ActOnObjCAtTryStmt(SourceLocation AtLoc,
+  virtual StmtResult ActOnObjCAtTryStmt(SourceLocation AtLoc,
                                               StmtArg Try, 
                                               MultiStmtArg CatchStmts,
                                               StmtArg Finally) {
     return StmtEmpty();
   }
 
-  virtual OwningStmtResult ActOnObjCAtThrowStmt(SourceLocation AtLoc,
+  virtual StmtResult ActOnObjCAtThrowStmt(SourceLocation AtLoc,
                                                 ExprArg Throw,
                                                 Scope *CurScope) {
     return StmtEmpty();
   }
 
-  virtual OwningStmtResult ActOnObjCAtSynchronizedStmt(SourceLocation AtLoc,
+  virtual StmtResult ActOnObjCAtSynchronizedStmt(SourceLocation AtLoc,
                                                        ExprArg SynchExpr,
                                                        StmtArg SynchBody) {
     return StmtEmpty();
@@ -1020,13 +1014,13 @@
     return 0;
   }
 
-  virtual OwningStmtResult ActOnCXXCatchBlock(SourceLocation CatchLoc,
+  virtual StmtResult ActOnCXXCatchBlock(SourceLocation CatchLoc,
                                               Decl *ExceptionDecl,
                                               StmtArg HandlerBlock) {
     return StmtEmpty();
   }
 
-  virtual OwningStmtResult ActOnCXXTryBlock(SourceLocation TryLoc,
+  virtual StmtResult ActOnCXXTryBlock(SourceLocation TryLoc,
                                             StmtArg TryBlock,
                                             MultiStmtArg Handlers) {
     return StmtEmpty();
@@ -1095,7 +1089,7 @@
   /// \param IsAddressOfOperand whether the token that precedes this 
   /// id-expression or identifier was an ampersand ('&'), indicating that 
   /// we will be taking the address of this expression.
-  virtual OwningExprResult ActOnIdExpression(Scope *S,
+  virtual ExprResult ActOnIdExpression(Scope *S,
                                              CXXScopeSpec &SS,
                                              UnqualifiedId &Name,
                                              bool HasTrailingLParen,
@@ -1103,30 +1097,30 @@
     return ExprEmpty();
   }
   
-  virtual OwningExprResult ActOnPredefinedExpr(SourceLocation Loc,
+  virtual ExprResult ActOnPredefinedExpr(SourceLocation Loc,
                                                tok::TokenKind Kind) {
     return ExprEmpty();
   }
-  virtual OwningExprResult ActOnCharacterConstant(const Token &) {
+  virtual ExprResult ActOnCharacterConstant(const Token &) {
     return ExprEmpty();
   }
-  virtual OwningExprResult ActOnNumericConstant(const Token &) {
+  virtual ExprResult ActOnNumericConstant(const Token &) {
     return ExprEmpty();
   }
 
   /// ActOnStringLiteral - The specified tokens were lexed as pasted string
   /// fragments (e.g. "foo" "bar" L"baz").
-  virtual OwningExprResult ActOnStringLiteral(const Token *Toks,
+  virtual ExprResult ActOnStringLiteral(const Token *Toks,
                                               unsigned NumToks) {
     return ExprEmpty();
   }
 
-  virtual OwningExprResult ActOnParenExpr(SourceLocation L, SourceLocation R,
+  virtual ExprResult ActOnParenExpr(SourceLocation L, SourceLocation R,
                                           ExprArg Val) {
     return move(Val);  // Default impl returns operand.
   }
 
-  virtual OwningExprResult ActOnParenOrParenListExpr(SourceLocation L,
+  virtual ExprResult ActOnParenOrParenListExpr(SourceLocation L,
                                                      SourceLocation R,
                                                      MultiExprArg Val,
                                                      ParsedType TypeOfCast
@@ -1135,12 +1129,12 @@
   }
 
   // Postfix Expressions.
-  virtual OwningExprResult ActOnPostfixUnaryOp(Scope *S, SourceLocation OpLoc,
+  virtual ExprResult ActOnPostfixUnaryOp(Scope *S, SourceLocation OpLoc,
                                                tok::TokenKind Kind,
                                                ExprArg Input) {
     return ExprEmpty();
   }
-  virtual OwningExprResult ActOnArraySubscriptExpr(Scope *S, ExprArg Base,
+  virtual ExprResult ActOnArraySubscriptExpr(Scope *S, ExprArg Base,
                                                    SourceLocation LLoc,
                                                    ExprArg Idx,
                                                    SourceLocation RLoc) {
@@ -1172,7 +1166,7 @@
   ///
   /// \param HasTrailingLParen whether this member name is immediately followed
   /// by a left parentheses ('(').
-  virtual OwningExprResult ActOnMemberAccessExpr(Scope *S, ExprArg Base,
+  virtual ExprResult ActOnMemberAccessExpr(Scope *S, ExprArg Base,
                                                  SourceLocation OpLoc,
                                                  tok::TokenKind OpKind,
                                                  CXXScopeSpec &SS,
@@ -1186,7 +1180,7 @@
   /// This provides the location of the left/right parens and a list of comma
   /// locations.  There are guaranteed to be one fewer commas than arguments,
   /// unless there are zero arguments.
-  virtual OwningExprResult ActOnCallExpr(Scope *S, ExprArg Fn,
+  virtual ExprResult ActOnCallExpr(Scope *S, ExprArg Fn,
                                          SourceLocation LParenLoc,
                                          MultiExprArg Args,
                                          SourceLocation *CommaLocs,
@@ -1195,23 +1189,23 @@
   }
 
   // Unary Operators.  'Tok' is the token for the operator.
-  virtual OwningExprResult ActOnUnaryOp(Scope *S, SourceLocation OpLoc,
+  virtual ExprResult ActOnUnaryOp(Scope *S, SourceLocation OpLoc,
                                         tok::TokenKind Op, ExprArg Input) {
     return ExprEmpty();
   }
-  virtual OwningExprResult
+  virtual ExprResult
     ActOnSizeOfAlignOfExpr(SourceLocation OpLoc, bool isSizeof, bool isType,
                            void *TyOrEx, const SourceRange &ArgRange) {
     return ExprEmpty();
   }
 
-  virtual OwningExprResult ActOnCompoundLiteral(SourceLocation LParen,
+  virtual ExprResult ActOnCompoundLiteral(SourceLocation LParen,
                                                 ParsedType Ty,
                                                 SourceLocation RParen,
                                                 ExprArg Op) {
     return ExprEmpty();
   }
-  virtual OwningExprResult ActOnInitList(SourceLocation LParenLoc,
+  virtual ExprResult ActOnInitList(SourceLocation LParenLoc,
                                          MultiExprArg InitList,
                                          SourceLocation RParenLoc) {
     return ExprEmpty();
@@ -1229,14 +1223,14 @@
   ///
   /// @param Init The value that the entity (or entities) described by
   /// the designation will be initialized with.
-  virtual OwningExprResult ActOnDesignatedInitializer(Designation &Desig,
+  virtual ExprResult ActOnDesignatedInitializer(Designation &Desig,
                                                       SourceLocation Loc,
                                                       bool GNUSyntax,
-                                                      OwningExprResult Init) {
+                                                      ExprResult Init) {
     return ExprEmpty();
   }
 
-  virtual OwningExprResult ActOnCastExpr(Scope *S, SourceLocation LParenLoc,
+  virtual ExprResult ActOnCastExpr(Scope *S, SourceLocation LParenLoc,
                                          ParsedType Ty, SourceLocation RParenLoc,
                                          ExprArg Op) {
     return ExprEmpty();
@@ -1246,7 +1240,7 @@
     return false;
   }
 
-  virtual OwningExprResult ActOnBinOp(Scope *S, SourceLocation TokLoc,
+  virtual ExprResult ActOnBinOp(Scope *S, SourceLocation TokLoc,
                                       tok::TokenKind Kind,
                                       ExprArg LHS, ExprArg RHS) {
     return ExprEmpty();
@@ -1254,7 +1248,7 @@
 
   /// ActOnConditionalOp - Parse a ?: operation.  Note that 'LHS' may be null
   /// in the case of a the GNU conditional expr extension.
-  virtual OwningExprResult ActOnConditionalOp(SourceLocation QuestionLoc,
+  virtual ExprResult ActOnConditionalOp(SourceLocation QuestionLoc,
                                               SourceLocation ColonLoc,
                                               ExprArg Cond, ExprArg LHS,
                                               ExprArg RHS) {
@@ -1263,13 +1257,13 @@
 
   //===---------------------- GNU Extension Expressions -------------------===//
 
-  virtual OwningExprResult ActOnAddrLabel(SourceLocation OpLoc,
+  virtual ExprResult ActOnAddrLabel(SourceLocation OpLoc,
                                           SourceLocation LabLoc,
                                           IdentifierInfo *LabelII) { // "&&foo"
     return ExprEmpty();
   }
 
-  virtual OwningExprResult ActOnStmtExpr(SourceLocation LPLoc, StmtArg SubStmt,
+  virtual ExprResult ActOnStmtExpr(SourceLocation LPLoc, StmtArg SubStmt,
                                          SourceLocation RPLoc) { // "({..})"
     return ExprEmpty();
   }
@@ -1284,7 +1278,7 @@
     } U;
   };
 
-  virtual OwningExprResult ActOnBuiltinOffsetOf(Scope *S,
+  virtual ExprResult ActOnBuiltinOffsetOf(Scope *S,
                                                 SourceLocation BuiltinLoc,
                                                 SourceLocation TypeLoc,
                                                 ParsedType Arg1,
@@ -1295,21 +1289,21 @@
   }
 
   // __builtin_types_compatible_p(type1, type2)
-  virtual OwningExprResult ActOnTypesCompatibleExpr(SourceLocation BuiltinLoc,
+  virtual ExprResult ActOnTypesCompatibleExpr(SourceLocation BuiltinLoc,
                                                     ParsedType arg1,
                                                     ParsedType arg2,
                                                     SourceLocation RPLoc) {
     return ExprEmpty();
   }
   // __builtin_choose_expr(constExpr, expr1, expr2)
-  virtual OwningExprResult ActOnChooseExpr(SourceLocation BuiltinLoc,
+  virtual ExprResult ActOnChooseExpr(SourceLocation BuiltinLoc,
                                            ExprArg cond, ExprArg expr1,
                                            ExprArg expr2, SourceLocation RPLoc){
     return ExprEmpty();
   }
 
   // __builtin_va_arg(expr, type)
-  virtual OwningExprResult ActOnVAArg(SourceLocation BuiltinLoc,
+  virtual ExprResult ActOnVAArg(SourceLocation BuiltinLoc,
                                       ExprArg expr, ParsedType type,
                                       SourceLocation RPLoc) {
     return ExprEmpty();
@@ -1317,7 +1311,7 @@
 
   /// ActOnGNUNullExpr - Parsed the GNU __null expression, the token
   /// for which is at position TokenLoc.
-  virtual OwningExprResult ActOnGNUNullExpr(SourceLocation TokenLoc) {
+  virtual ExprResult ActOnGNUNullExpr(SourceLocation TokenLoc) {
     return ExprEmpty();
   }
 
@@ -1337,7 +1331,7 @@
 
   /// ActOnBlockStmtExpr - This is called when the body of a block statement
   /// literal was successfully completed.  ^(int x){...}
-  virtual OwningExprResult ActOnBlockStmtExpr(SourceLocation CaretLoc,
+  virtual ExprResult ActOnBlockStmtExpr(SourceLocation CaretLoc,
                                               StmtArg Body,
                                               Scope *CurScope) {
     return ExprEmpty();
@@ -1558,7 +1552,7 @@
 
 
   /// ActOnCXXNamedCast - Parse {dynamic,static,reinterpret,const}_cast's.
-  virtual OwningExprResult ActOnCXXNamedCast(SourceLocation OpLoc,
+  virtual ExprResult ActOnCXXNamedCast(SourceLocation OpLoc,
                                              tok::TokenKind Kind,
                                              SourceLocation LAngleBracketLoc,
                                              ParsedType Ty,
@@ -1570,7 +1564,7 @@
   }
 
   /// ActOnCXXTypeidOfType - Parse typeid( type-id ).
-  virtual OwningExprResult ActOnCXXTypeid(SourceLocation OpLoc,
+  virtual ExprResult ActOnCXXTypeid(SourceLocation OpLoc,
                                           SourceLocation LParenLoc, bool isType,
                                           void *TyOrExpr,
                                           SourceLocation RParenLoc) {
@@ -1578,23 +1572,23 @@
   }
 
   /// ActOnCXXThis - Parse the C++ 'this' pointer.
-  virtual OwningExprResult ActOnCXXThis(SourceLocation ThisLoc) {
+  virtual ExprResult ActOnCXXThis(SourceLocation ThisLoc) {
     return ExprEmpty();
   }
 
   /// ActOnCXXBoolLiteral - Parse {true,false} literals.
-  virtual OwningExprResult ActOnCXXBoolLiteral(SourceLocation OpLoc,
+  virtual ExprResult ActOnCXXBoolLiteral(SourceLocation OpLoc,
                                                tok::TokenKind Kind) {
     return ExprEmpty();
   }
 
   /// ActOnCXXNullPtrLiteral - Parse 'nullptr'.
-  virtual OwningExprResult ActOnCXXNullPtrLiteral(SourceLocation Loc) {
+  virtual ExprResult ActOnCXXNullPtrLiteral(SourceLocation Loc) {
     return ExprEmpty();
   }
 
   /// ActOnCXXThrow - Parse throw expressions.
-  virtual OwningExprResult ActOnCXXThrow(SourceLocation OpLoc, ExprArg Op) {
+  virtual ExprResult ActOnCXXThrow(SourceLocation OpLoc, ExprArg Op) {
     return ExprEmpty();
   }
 
@@ -1602,7 +1596,7 @@
   /// Can be interpreted either as function-style casting ("int(x)")
   /// or class type construction ("ClassType(x,y,z)")
   /// or creation of a value-initialized type ("int()").
-  virtual OwningExprResult ActOnCXXTypeConstructExpr(SourceRange TypeRange,
+  virtual ExprResult ActOnCXXTypeConstructExpr(SourceRange TypeRange,
                                                      ParsedType TypeRep,
                                                      SourceLocation LParenLoc,
                                                      MultiExprArg Exprs,
@@ -1638,7 +1632,7 @@
   /// a boolean value.
   ///
   /// \param SubExpr The expression that is being converted to bool.
-  virtual OwningExprResult ActOnBooleanCondition(Scope *S, SourceLocation Loc,
+  virtual ExprResult ActOnBooleanCondition(Scope *S, SourceLocation Loc,
                                                  ExprArg SubExpr) {
     return move(SubExpr);
   }
@@ -1671,7 +1665,7 @@
   ///
   /// \param ConstructorRParen The location of the closing parenthesis (')') for
   /// the constructor arguments, if any.
-  virtual OwningExprResult ActOnCXXNew(SourceLocation StartLoc, bool UseGlobal,
+  virtual ExprResult ActOnCXXNew(SourceLocation StartLoc, bool UseGlobal,
                                        SourceLocation PlacementLParen,
                                        MultiExprArg PlacementArgs,
                                        SourceLocation PlacementRParen,
@@ -1685,13 +1679,13 @@
   /// ActOnCXXDelete - Parsed a C++ 'delete' expression. UseGlobal is true if
   /// the delete was qualified (::delete). ArrayForm is true if the array form
   /// was used (delete[]).
-  virtual OwningExprResult ActOnCXXDelete(SourceLocation StartLoc,
+  virtual ExprResult ActOnCXXDelete(SourceLocation StartLoc,
                                           bool UseGlobal, bool ArrayForm,
                                           ExprArg Operand) {
     return ExprEmpty();
   }
 
-  virtual OwningExprResult ActOnUnaryTypeTrait(UnaryTypeTrait OTT,
+  virtual ExprResult ActOnUnaryTypeTrait(UnaryTypeTrait OTT,
                                                SourceLocation KWLoc,
                                                SourceLocation LParen,
                                                ParsedType Ty,
@@ -1723,7 +1717,7 @@
   /// object type is a scalar and when the object type is dependent.
   ///
   /// \returns the (possibly modified) \p Base expression
-  virtual OwningExprResult ActOnStartCXXMemberReference(Scope *S,
+  virtual ExprResult ActOnStartCXXMemberReference(Scope *S,
                                                         ExprArg Base,
                                                         SourceLocation OpLoc,
                                                         tok::TokenKind OpKind,
@@ -1766,7 +1760,7 @@
   ///
   /// \param HasTrailingLParen Whether the next token in the stream is
   /// a left parentheses.
-  virtual OwningExprResult ActOnPseudoDestructorExpr(Scope *S, ExprArg Base,
+  virtual ExprResult ActOnPseudoDestructorExpr(Scope *S, ExprArg Base,
                                                      SourceLocation OpLoc,
                                                      tok::TokenKind OpKind,
                                                      CXXScopeSpec &SS,
@@ -1780,7 +1774,7 @@
 
   /// ActOnFinishFullExpr - Called whenever a full expression has been parsed.
   /// (C++ [intro.execution]p12).
-  virtual OwningExprResult ActOnFinishFullExpr(ExprArg Expr) {
+  virtual ExprResult ActOnFinishFullExpr(ExprArg Expr) {
     return move(Expr);
   }
 
@@ -2515,7 +2509,7 @@
     return 0;
   }
 
-  virtual OwningExprResult
+  virtual ExprResult
   ActOnClassPropertyRefExpr(IdentifierInfo &receiverName,
                             IdentifierInfo &propertyName,
                             SourceLocation receiverNameLoc,
@@ -2580,7 +2574,7 @@
   /// \param SelectorLoc The location of the first identifier in the selector.
   /// \param RBrac The location of the closing square bracket ']'.
   /// \param Args The message arguments.
-  virtual OwningExprResult ActOnSuperMessage(Scope *S, SourceLocation SuperLoc,
+  virtual ExprResult ActOnSuperMessage(Scope *S, SourceLocation SuperLoc,
                                              Selector Sel,
                                              SourceLocation LBracLoc,
                                              SourceLocation SelectorLoc,
@@ -2596,13 +2590,13 @@
   /// \param SelectorLoc The location of the first identifier in the selector.
   /// \param RBrac The location of the closing square bracket ']'.
   /// \param Args The message arguments.
-  virtual OwningExprResult ActOnClassMessage(Scope *S,
-                                             ParsedType Receiver,
-                                             Selector Sel,
-                                             SourceLocation LBracLoc, 
-                                             SourceLocation SelectorLoc,
-                                             SourceLocation RBracLoc,
-                                             MultiExprArg Args) = 0;
+  virtual ExprResult ActOnClassMessage(Scope *S,
+                                       ParsedType Receiver,
+                                       Selector Sel,
+                                       SourceLocation LBracLoc, 
+                                       SourceLocation SelectorLoc,
+                                       SourceLocation RBracLoc,
+                                       MultiExprArg Args) = 0;
 
   /// \brief Parsed a message send to an object instance.
   ///
@@ -2613,13 +2607,13 @@
   /// \param SelectorLoc The location of the first identifier in the selector.
   /// \param RBrac The location of the closing square bracket ']'.
   /// \param Args The message arguments.
-  virtual OwningExprResult ActOnInstanceMessage(Scope *S,
-                                                ExprArg Receiver,
-                                                Selector Sel,
-                                                SourceLocation LBracLoc, 
-                                                SourceLocation SelectorLoc, 
-                                                SourceLocation RBracLoc,
-                                                MultiExprArg Args) = 0;
+  virtual ExprResult ActOnInstanceMessage(Scope *S,
+                                          ExprArg Receiver,
+                                          Selector Sel,
+                                          SourceLocation LBracLoc, 
+                                          SourceLocation SelectorLoc, 
+                                          SourceLocation RBracLoc,
+                                          MultiExprArg Args) = 0;
 
   virtual Decl *ActOnForwardClassDeclaration(
     SourceLocation AtClassLoc,

Modified: cfe/trunk/include/clang/Sema/Initialization.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Initialization.h?rev=111903&r1=111902&r2=111903&view=diff
==============================================================================
--- cfe/trunk/include/clang/Sema/Initialization.h (original)
+++ cfe/trunk/include/clang/Sema/Initialization.h Tue Aug 24 01:29:42 2010
@@ -625,11 +625,11 @@
   /// \returns an expression that performs the actual object initialization, if
   /// the initialization is well-formed. Otherwise, emits diagnostics
   /// and returns an invalid expression.
-  Action::OwningExprResult Perform(Sema &S,
-                                   const InitializedEntity &Entity,
-                                   const InitializationKind &Kind,
-                                   Action::MultiExprArg Args,
-                                   QualType *ResultType = 0);
+  ExprResult Perform(Sema &S,
+                     const InitializedEntity &Entity,
+                     const InitializationKind &Kind,
+                     Action::MultiExprArg Args,
+                     QualType *ResultType = 0);
   
   /// \brief Diagnose an potentially-invalid initialization sequence.
   ///

Modified: cfe/trunk/include/clang/Sema/Ownership.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Ownership.h?rev=111903&r1=111902&r2=111903&view=diff
==============================================================================
--- cfe/trunk/include/clang/Sema/Ownership.h (original)
+++ cfe/trunk/include/clang/Sema/Ownership.h Tue Aug 24 01:29:42 2010
@@ -431,21 +431,18 @@
   typedef ActionResult<Decl*> DeclResult;
   typedef OpaquePtr<TemplateName> ParsedTemplateTy;
 
-  typedef ActionResult<Expr*> OwningExprResult;
-  typedef ActionResult<Stmt*> OwningStmtResult;
-
   inline Expr *move(Expr *E) { return E; }
   inline Stmt *move(Stmt *S) { return S; }
 
   typedef ASTMultiPtr<Expr*> MultiExprArg;
   typedef ASTMultiPtr<TemplateParameterList*> MultiTemplateParamsArg;
 
-  inline Expr *AssertSuccess(OwningExprResult R) {
+  inline Expr *AssertSuccess(ExprResult R) {
     assert(!R.isInvalid() && "operation was asserted to never fail!");
     return R.get();
   }
 
-  inline Stmt *AssertSuccess(OwningStmtResult R) {
+  inline Stmt *AssertSuccess(StmtResult R) {
     assert(!R.isInvalid() && "operation was asserted to never fail!");
     return R.get();
   }

Modified: cfe/trunk/include/clang/Sema/Sema.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Sema.h?rev=111903&r1=111902&r2=111903&view=diff
==============================================================================
--- cfe/trunk/include/clang/Sema/Sema.h (original)
+++ cfe/trunk/include/clang/Sema/Sema.h Tue Aug 24 01:29:42 2010
@@ -686,19 +686,19 @@
   virtual void DeleteExpr(ExprTy *E);
   virtual void DeleteStmt(StmtTy *S);
 
-  OwningExprResult Owned(Expr* E) {
+  ExprResult Owned(Expr* E) {
     assert(!E || E->isRetained());
-    return OwningExprResult(E);
+    return ExprResult(E);
   }
-  OwningExprResult Owned(ExprResult R) {
+  ExprResult Owned(ExprResult R) {
     if (R.isInvalid())
       return ExprError();
     assert(!R.get() || ((Expr*) R.get())->isRetained());
-    return OwningExprResult(R.get());
+    return ExprResult(R.get());
   }
-  OwningStmtResult Owned(Stmt* S) {
+  StmtResult Owned(Stmt* S) {
     assert(!S || S->isRetained());
-    return OwningStmtResult(S);
+    return StmtResult(S);
   }
 
   virtual void ActOnEndOfTranslationUnit();
@@ -1223,9 +1223,9 @@
   CompareDerivedToBaseConversions(const StandardConversionSequence& SCS1,
                                   const StandardConversionSequence& SCS2);
 
-  OwningExprResult PerformCopyInitialization(const InitializedEntity &Entity,
+  ExprResult PerformCopyInitialization(const InitializedEntity &Entity,
                                              SourceLocation EqualLoc,
-                                             OwningExprResult Init);
+                                             ExprResult Init);
   ImplicitConversionSequence
   TryObjectArgumentInitialization(QualType FromType, CXXMethodDecl *Method,
                                   CXXRecordDecl *ActingContext);
@@ -1240,7 +1240,7 @@
   ImplicitConversionSequence TryContextuallyConvertToObjCId(Expr *From);
   bool PerformContextuallyConvertToObjCId(Expr *&From);
 
-  OwningExprResult 
+  ExprResult 
   ConvertToIntegralOrEnumerationType(SourceLocation Loc, ExprArg FromE,
                                      const PartialDiagnostic &NotIntDiag,
                                      const PartialDiagnostic &IncompleteDiag,
@@ -1370,7 +1370,7 @@
   Expr *FixOverloadedFunctionReference(Expr *E,
                                        DeclAccessPair FoundDecl,
                                        FunctionDecl *Fn);
-  OwningExprResult FixOverloadedFunctionReference(OwningExprResult,
+  ExprResult FixOverloadedFunctionReference(ExprResult,
                                                   DeclAccessPair FoundDecl,
                                                   FunctionDecl *Fn);
 
@@ -1379,28 +1379,28 @@
                                    OverloadCandidateSet &CandidateSet,
                                    bool PartialOverloading = false);
 
-  OwningExprResult BuildOverloadedCallExpr(Scope *S, Expr *Fn,
+  ExprResult BuildOverloadedCallExpr(Scope *S, Expr *Fn,
                                            UnresolvedLookupExpr *ULE,
                                            SourceLocation LParenLoc,
                                            Expr **Args, unsigned NumArgs,
                                            SourceLocation *CommaLocs,
                                            SourceLocation RParenLoc);
 
-  OwningExprResult CreateOverloadedUnaryOp(SourceLocation OpLoc,
+  ExprResult CreateOverloadedUnaryOp(SourceLocation OpLoc,
                                            unsigned Opc,
                                            const UnresolvedSetImpl &Fns,
                                            ExprArg input);
 
-  OwningExprResult CreateOverloadedBinOp(SourceLocation OpLoc,
+  ExprResult CreateOverloadedBinOp(SourceLocation OpLoc,
                                          unsigned Opc,
                                          const UnresolvedSetImpl &Fns,
                                          Expr *LHS, Expr *RHS);
 
-  OwningExprResult CreateOverloadedArraySubscriptExpr(SourceLocation LLoc,
+  ExprResult CreateOverloadedArraySubscriptExpr(SourceLocation LLoc,
                                                       SourceLocation RLoc,
                                                       ExprArg Base,ExprArg Idx);
 
-  OwningExprResult
+  ExprResult
   BuildCallToMemberFunction(Scope *S, Expr *MemExpr,
                             SourceLocation LParenLoc, Expr **Args,
                             unsigned NumArgs, SourceLocation *CommaLocs,
@@ -1411,7 +1411,7 @@
                                SourceLocation *CommaLocs,
                                SourceLocation RParenLoc);
 
-  OwningExprResult BuildOverloadedArrowExpr(Scope *S, ExprArg Base,
+  ExprResult BuildOverloadedArrowExpr(Scope *S, ExprArg Base,
                                             SourceLocation OpLoc);
 
   /// CheckCallReturnType - Checks that a call expression's return type is
@@ -1760,74 +1760,74 @@
   //===--------------------------------------------------------------------===//
   // Statement Parsing Callbacks: SemaStmt.cpp.
 public:
-  virtual OwningStmtResult ActOnExprStmt(FullExprArg Expr);
+  virtual StmtResult ActOnExprStmt(FullExprArg Expr);
 
-  virtual OwningStmtResult ActOnNullStmt(SourceLocation SemiLoc);
-  virtual OwningStmtResult ActOnCompoundStmt(SourceLocation L, SourceLocation R,
+  virtual StmtResult ActOnNullStmt(SourceLocation SemiLoc);
+  virtual StmtResult ActOnCompoundStmt(SourceLocation L, SourceLocation R,
                                              MultiStmtArg Elts,
                                              bool isStmtExpr);
-  virtual OwningStmtResult ActOnDeclStmt(DeclGroupPtrTy Decl,
+  virtual StmtResult ActOnDeclStmt(DeclGroupPtrTy Decl,
                                          SourceLocation StartLoc,
                                          SourceLocation EndLoc);
   virtual void ActOnForEachDeclStmt(DeclGroupPtrTy Decl);
-  virtual OwningStmtResult ActOnCaseStmt(SourceLocation CaseLoc, ExprArg LHSVal,
+  virtual StmtResult ActOnCaseStmt(SourceLocation CaseLoc, ExprArg LHSVal,
                                     SourceLocation DotDotDotLoc, ExprArg RHSVal,
                                     SourceLocation ColonLoc);
   virtual void ActOnCaseStmtBody(StmtTy *CaseStmt, StmtArg SubStmt);
 
-  virtual OwningStmtResult ActOnDefaultStmt(SourceLocation DefaultLoc,
+  virtual StmtResult ActOnDefaultStmt(SourceLocation DefaultLoc,
                                             SourceLocation ColonLoc,
                                             StmtArg SubStmt, Scope *CurScope);
-  virtual OwningStmtResult ActOnLabelStmt(SourceLocation IdentLoc,
+  virtual StmtResult ActOnLabelStmt(SourceLocation IdentLoc,
                                           IdentifierInfo *II,
                                           SourceLocation ColonLoc,
                                           StmtArg SubStmt);
-  virtual OwningStmtResult ActOnIfStmt(SourceLocation IfLoc,
+  virtual StmtResult ActOnIfStmt(SourceLocation IfLoc,
                                        FullExprArg CondVal, Decl *CondVar,
                                        StmtArg ThenVal,
                                        SourceLocation ElseLoc, StmtArg ElseVal);
-  virtual OwningStmtResult ActOnStartOfSwitchStmt(SourceLocation SwitchLoc,
+  virtual StmtResult ActOnStartOfSwitchStmt(SourceLocation SwitchLoc,
                                                   ExprArg Cond,
                                                   Decl *CondVar);
-  virtual OwningStmtResult ActOnFinishSwitchStmt(SourceLocation SwitchLoc,
+  virtual StmtResult ActOnFinishSwitchStmt(SourceLocation SwitchLoc,
                                                  StmtArg Switch, StmtArg Body);
-  virtual OwningStmtResult ActOnWhileStmt(SourceLocation WhileLoc,
+  virtual StmtResult ActOnWhileStmt(SourceLocation WhileLoc,
                                           FullExprArg Cond,
                                           Decl *CondVar, StmtArg Body);
-  virtual OwningStmtResult ActOnDoStmt(SourceLocation DoLoc, StmtArg Body,
+  virtual StmtResult ActOnDoStmt(SourceLocation DoLoc, StmtArg Body,
                                        SourceLocation WhileLoc,
                                        SourceLocation CondLParen, ExprArg Cond,
                                        SourceLocation CondRParen);
 
-  virtual OwningStmtResult ActOnForStmt(SourceLocation ForLoc,
+  virtual StmtResult ActOnForStmt(SourceLocation ForLoc,
                                         SourceLocation LParenLoc,
                                         StmtArg First, FullExprArg Second,
                                         Decl *SecondVar,
                                         FullExprArg Third,
                                         SourceLocation RParenLoc,
                                         StmtArg Body);
-  virtual OwningStmtResult ActOnObjCForCollectionStmt(SourceLocation ForColLoc,
+  virtual StmtResult ActOnObjCForCollectionStmt(SourceLocation ForColLoc,
                                        SourceLocation LParenLoc,
                                        StmtArg First, ExprArg Second,
                                        SourceLocation RParenLoc, StmtArg Body);
 
-  virtual OwningStmtResult ActOnGotoStmt(SourceLocation GotoLoc,
+  virtual StmtResult ActOnGotoStmt(SourceLocation GotoLoc,
                                          SourceLocation LabelLoc,
                                          IdentifierInfo *LabelII);
-  virtual OwningStmtResult ActOnIndirectGotoStmt(SourceLocation GotoLoc,
+  virtual StmtResult ActOnIndirectGotoStmt(SourceLocation GotoLoc,
                                                  SourceLocation StarLoc,
                                                  ExprArg DestExp);
-  virtual OwningStmtResult ActOnContinueStmt(SourceLocation ContinueLoc,
+  virtual StmtResult ActOnContinueStmt(SourceLocation ContinueLoc,
                                              Scope *CurScope);
-  virtual OwningStmtResult ActOnBreakStmt(SourceLocation GotoLoc,
+  virtual StmtResult ActOnBreakStmt(SourceLocation GotoLoc,
                                           Scope *CurScope);
 
-  virtual OwningStmtResult ActOnReturnStmt(SourceLocation ReturnLoc,
+  virtual StmtResult ActOnReturnStmt(SourceLocation ReturnLoc,
                                            ExprArg RetValExp);
-  OwningStmtResult ActOnBlockReturnStmt(SourceLocation ReturnLoc,
+  StmtResult ActOnBlockReturnStmt(SourceLocation ReturnLoc,
                                         Expr *RetValExp);
 
-  virtual OwningStmtResult ActOnAsmStmt(SourceLocation AsmLoc,
+  virtual StmtResult ActOnAsmStmt(SourceLocation AsmLoc,
                                         bool IsSimple,
                                         bool IsVolatile,
                                         unsigned NumOutputs,
@@ -1847,24 +1847,24 @@
 
   virtual Decl *ActOnObjCExceptionDecl(Scope *S, Declarator &D);
 
-  virtual OwningStmtResult ActOnObjCAtCatchStmt(SourceLocation AtLoc,
+  virtual StmtResult ActOnObjCAtCatchStmt(SourceLocation AtLoc,
                                                 SourceLocation RParen,
                                                 Decl *Parm, StmtArg Body);
 
-  virtual OwningStmtResult ActOnObjCAtFinallyStmt(SourceLocation AtLoc,
+  virtual StmtResult ActOnObjCAtFinallyStmt(SourceLocation AtLoc,
                                                   StmtArg Body);
 
-  virtual OwningStmtResult ActOnObjCAtTryStmt(SourceLocation AtLoc,
+  virtual StmtResult ActOnObjCAtTryStmt(SourceLocation AtLoc,
                                               StmtArg Try,
                                               MultiStmtArg Catch,
                                               StmtArg Finally);
 
-  virtual OwningStmtResult BuildObjCAtThrowStmt(SourceLocation AtLoc,
+  virtual StmtResult BuildObjCAtThrowStmt(SourceLocation AtLoc,
                                                 ExprArg Throw);
-  virtual OwningStmtResult ActOnObjCAtThrowStmt(SourceLocation AtLoc,
+  virtual StmtResult ActOnObjCAtThrowStmt(SourceLocation AtLoc,
                                                 ExprArg Throw,
                                                 Scope *CurScope);
-  virtual OwningStmtResult ActOnObjCAtSynchronizedStmt(SourceLocation AtLoc,
+  virtual StmtResult ActOnObjCAtSynchronizedStmt(SourceLocation AtLoc,
                                                        ExprArg SynchExpr,
                                                        StmtArg SynchBody);
 
@@ -1875,10 +1875,10 @@
                                      SourceRange Range);
   virtual Decl *ActOnExceptionDeclarator(Scope *S, Declarator &D);
 
-  virtual OwningStmtResult ActOnCXXCatchBlock(SourceLocation CatchLoc,
+  virtual StmtResult ActOnCXXCatchBlock(SourceLocation CatchLoc,
                                               Decl *ExDecl,
                                               StmtArg HandlerBlock);
-  virtual OwningStmtResult ActOnCXXTryBlock(SourceLocation TryLoc,
+  virtual StmtResult ActOnCXXTryBlock(SourceLocation TryLoc,
                                             StmtArg TryBlock,
                                             MultiStmtArg Handlers);
   void DiagnoseReturnInConstructorExceptionHandler(CXXTryStmt *TryBlock);
@@ -1922,7 +1922,7 @@
   // Primary Expressions.
   virtual SourceRange getExprRange(ExprTy *E) const;
 
-  virtual OwningExprResult ActOnIdExpression(Scope *S,
+  virtual ExprResult ActOnIdExpression(Scope *S,
                                              CXXScopeSpec &SS,
                                              UnqualifiedId &Name,
                                              bool HasTrailingLParen,
@@ -1931,33 +1931,33 @@
   bool DiagnoseEmptyLookup(Scope *S, CXXScopeSpec &SS, LookupResult &R,
                            CorrectTypoContext CTC = CTC_Unknown);
 
-  OwningExprResult LookupInObjCMethod(LookupResult &R,
+  ExprResult LookupInObjCMethod(LookupResult &R,
                                       Scope *S,
                                       IdentifierInfo *II,
                                       bool AllowBuiltinCreation=false);
 
-  OwningExprResult ActOnDependentIdExpression(const CXXScopeSpec &SS,
+  ExprResult ActOnDependentIdExpression(const CXXScopeSpec &SS,
                                 const DeclarationNameInfo &NameInfo,
                                               bool isAddressOfOperand,
                                 const TemplateArgumentListInfo *TemplateArgs);
 
-  OwningExprResult BuildDeclRefExpr(ValueDecl *D, QualType Ty,
+  ExprResult BuildDeclRefExpr(ValueDecl *D, QualType Ty,
                                     SourceLocation Loc,
                                     const CXXScopeSpec *SS = 0);
-  OwningExprResult BuildDeclRefExpr(ValueDecl *D, QualType Ty,
+  ExprResult BuildDeclRefExpr(ValueDecl *D, QualType Ty,
                                     const DeclarationNameInfo &NameInfo,
                                     const CXXScopeSpec *SS = 0);
   VarDecl *BuildAnonymousStructUnionMemberPath(FieldDecl *Field,
                                     llvm::SmallVectorImpl<FieldDecl *> &Path);
-  OwningExprResult
+  ExprResult
   BuildAnonymousStructUnionMemberReference(SourceLocation Loc,
                                            FieldDecl *Field,
                                            Expr *BaseObjectExpr = 0,
                                       SourceLocation OpLoc = SourceLocation());
-  OwningExprResult BuildPossibleImplicitMemberExpr(const CXXScopeSpec &SS,
+  ExprResult BuildPossibleImplicitMemberExpr(const CXXScopeSpec &SS,
                                                    LookupResult &R,
                                 const TemplateArgumentListInfo *TemplateArgs);
-  OwningExprResult BuildImplicitMemberExpr(const CXXScopeSpec &SS,
+  ExprResult BuildImplicitMemberExpr(const CXXScopeSpec &SS,
                                            LookupResult &R,
                                 const TemplateArgumentListInfo *TemplateArgs,
                                            bool IsDefiniteInstance);
@@ -1965,26 +1965,26 @@
                                   const LookupResult &R,
                                   bool HasTrailingLParen);
 
-  OwningExprResult BuildQualifiedDeclarationNameExpr(CXXScopeSpec &SS,
+  ExprResult BuildQualifiedDeclarationNameExpr(CXXScopeSpec &SS,
                                          const DeclarationNameInfo &NameInfo);
-  OwningExprResult BuildDependentDeclRefExpr(const CXXScopeSpec &SS,
+  ExprResult BuildDependentDeclRefExpr(const CXXScopeSpec &SS,
                                 const DeclarationNameInfo &NameInfo,
                                 const TemplateArgumentListInfo *TemplateArgs);
 
-  OwningExprResult BuildDeclarationNameExpr(const CXXScopeSpec &SS,
+  ExprResult BuildDeclarationNameExpr(const CXXScopeSpec &SS,
                                             LookupResult &R,
                                             bool ADL);
-  OwningExprResult BuildDeclarationNameExpr(const CXXScopeSpec &SS,
+  ExprResult BuildDeclarationNameExpr(const CXXScopeSpec &SS,
                                             const DeclarationNameInfo &NameInfo,
                                             NamedDecl *D);
 
-  virtual OwningExprResult ActOnPredefinedExpr(SourceLocation Loc,
+  virtual ExprResult ActOnPredefinedExpr(SourceLocation Loc,
                                                tok::TokenKind Kind);
-  virtual OwningExprResult ActOnNumericConstant(const Token &);
-  virtual OwningExprResult ActOnCharacterConstant(const Token &);
-  virtual OwningExprResult ActOnParenExpr(SourceLocation L, SourceLocation R,
+  virtual ExprResult ActOnNumericConstant(const Token &);
+  virtual ExprResult ActOnCharacterConstant(const Token &);
+  virtual ExprResult ActOnParenExpr(SourceLocation L, SourceLocation R,
                                           ExprArg Val);
-  virtual OwningExprResult ActOnParenOrParenListExpr(SourceLocation L,
+  virtual ExprResult ActOnParenOrParenListExpr(SourceLocation L,
                                                      SourceLocation R,
                                                      MultiExprArg Val,
                                                      ParsedType TypeOfCast
@@ -1992,24 +1992,24 @@
 
   /// ActOnStringLiteral - The specified tokens were lexed as pasted string
   /// fragments (e.g. "foo" "bar" L"baz").
-  virtual OwningExprResult ActOnStringLiteral(const Token *Toks,
+  virtual ExprResult ActOnStringLiteral(const Token *Toks,
                                               unsigned NumToks);
 
   // Binary/Unary Operators.  'Tok' is the token for the operator.
-  OwningExprResult CreateBuiltinUnaryOp(SourceLocation OpLoc,
+  ExprResult CreateBuiltinUnaryOp(SourceLocation OpLoc,
                                         unsigned OpcIn,
                                         ExprArg InputArg);
-  OwningExprResult BuildUnaryOp(Scope *S, SourceLocation OpLoc,
+  ExprResult BuildUnaryOp(Scope *S, SourceLocation OpLoc,
                                 UnaryOperator::Opcode Opc, ExprArg input);
-  virtual OwningExprResult ActOnUnaryOp(Scope *S, SourceLocation OpLoc,
+  virtual ExprResult ActOnUnaryOp(Scope *S, SourceLocation OpLoc,
                                         tok::TokenKind Op, ExprArg Input);
 
-  OwningExprResult CreateSizeOfAlignOfExpr(TypeSourceInfo *T,
+  ExprResult CreateSizeOfAlignOfExpr(TypeSourceInfo *T,
                                            SourceLocation OpLoc,
                                            bool isSizeOf, SourceRange R);
-  OwningExprResult CreateSizeOfAlignOfExpr(Expr *E, SourceLocation OpLoc,
+  ExprResult CreateSizeOfAlignOfExpr(Expr *E, SourceLocation OpLoc,
                                            bool isSizeOf, SourceRange R);
-  virtual OwningExprResult
+  virtual ExprResult
     ActOnSizeOfAlignOfExpr(SourceLocation OpLoc, bool isSizeof, bool isType,
                            void *TyOrEx, const SourceRange &ArgRange);
 
@@ -2017,20 +2017,20 @@
   bool CheckSizeOfAlignOfOperand(QualType type, SourceLocation OpLoc,
                                  const SourceRange &R, bool isSizeof);
 
-  virtual OwningExprResult ActOnPostfixUnaryOp(Scope *S, SourceLocation OpLoc,
+  virtual ExprResult ActOnPostfixUnaryOp(Scope *S, SourceLocation OpLoc,
                                                tok::TokenKind Kind,
                                                ExprArg Input);
 
-  virtual OwningExprResult ActOnArraySubscriptExpr(Scope *S, ExprArg Base,
+  virtual ExprResult ActOnArraySubscriptExpr(Scope *S, ExprArg Base,
                                                    SourceLocation LLoc,
                                                    ExprArg Idx,
                                                    SourceLocation RLoc);
-  OwningExprResult CreateBuiltinArraySubscriptExpr(ExprArg Base,
+  ExprResult CreateBuiltinArraySubscriptExpr(ExprArg Base,
                                                    SourceLocation LLoc,
                                                    ExprArg Idx,
                                                    SourceLocation RLoc);
 
-  OwningExprResult BuildMemberReferenceExpr(ExprArg Base,
+  ExprResult BuildMemberReferenceExpr(ExprArg Base,
                                             QualType BaseType,
                                             SourceLocation OpLoc,
                                             bool IsArrow,
@@ -2039,7 +2039,7 @@
                                 const DeclarationNameInfo &NameInfo,
                                 const TemplateArgumentListInfo *TemplateArgs);
 
-  OwningExprResult BuildMemberReferenceExpr(ExprArg Base,
+  ExprResult BuildMemberReferenceExpr(ExprArg Base,
                                             QualType BaseType,
                                             SourceLocation OpLoc, bool IsArrow,
                                             const CXXScopeSpec &SS,
@@ -2048,7 +2048,7 @@
                                  const TemplateArgumentListInfo *TemplateArgs,
                                           bool SuppressQualifierCheck = false);
 
-  OwningExprResult LookupMemberExpr(LookupResult &R, Expr *&Base,
+  ExprResult LookupMemberExpr(LookupResult &R, Expr *&Base,
                                     bool &IsArrow, SourceLocation OpLoc,
                                     CXXScopeSpec &SS,
                                     Decl *ObjCImpDecl,
@@ -2058,7 +2058,7 @@
                                      const CXXScopeSpec &SS,
                                      const LookupResult &R);
 
-  OwningExprResult ActOnDependentMemberExpr(ExprArg Base,
+  ExprResult ActOnDependentMemberExpr(ExprArg Base,
                                             QualType BaseType,
                                             bool IsArrow,
                                             SourceLocation OpLoc,
@@ -2067,7 +2067,7 @@
                                const DeclarationNameInfo &NameInfo,
                                const TemplateArgumentListInfo *TemplateArgs);
 
-  virtual OwningExprResult ActOnMemberAccessExpr(Scope *S, ExprArg Base,
+  virtual ExprResult ActOnMemberAccessExpr(Scope *S, ExprArg Base,
                                                  SourceLocation OpLoc,
                                                  tok::TokenKind OpKind,
                                                  CXXScopeSpec &SS,
@@ -2085,21 +2085,21 @@
   /// ActOnCallExpr - Handle a call to Fn with the specified array of arguments.
   /// This provides the location of the left/right parens and a list of comma
   /// locations.
-  virtual OwningExprResult ActOnCallExpr(Scope *S, ExprArg Fn,
+  virtual ExprResult ActOnCallExpr(Scope *S, ExprArg Fn,
                                          SourceLocation LParenLoc,
                                          MultiExprArg Args,
                                          SourceLocation *CommaLocs,
                                          SourceLocation RParenLoc);
-  OwningExprResult BuildResolvedCallExpr(Expr *Fn,
+  ExprResult BuildResolvedCallExpr(Expr *Fn,
                                          NamedDecl *NDecl,
                                          SourceLocation LParenLoc,
                                          Expr **Args, unsigned NumArgs,
                                          SourceLocation RParenLoc);
 
-  virtual OwningExprResult ActOnCastExpr(Scope *S, SourceLocation LParenLoc,
+  virtual ExprResult ActOnCastExpr(Scope *S, SourceLocation LParenLoc,
                                          ParsedType Ty, SourceLocation RParenLoc,
                                          ExprArg Op);
-  OwningExprResult BuildCStyleCastExpr(SourceLocation LParenLoc,
+  ExprResult BuildCStyleCastExpr(SourceLocation LParenLoc,
                                        TypeSourceInfo *Ty,
                                        SourceLocation RParenLoc,
                                        ExprArg Op);
@@ -2108,61 +2108,61 @@
     return GetTypeFromParser(Ty)->isVectorType();
   }
 
-  OwningExprResult MaybeConvertParenListExprToParenExpr(Scope *S, Expr *ME);
-  OwningExprResult ActOnCastOfParenListExpr(Scope *S, SourceLocation LParenLoc,
+  ExprResult MaybeConvertParenListExprToParenExpr(Scope *S, Expr *ME);
+  ExprResult ActOnCastOfParenListExpr(Scope *S, SourceLocation LParenLoc,
                                             SourceLocation RParenLoc, ExprArg E,
                                             TypeSourceInfo *TInfo);
 
-  virtual OwningExprResult ActOnCompoundLiteral(SourceLocation LParenLoc,
+  virtual ExprResult ActOnCompoundLiteral(SourceLocation LParenLoc,
                                                 ParsedType Ty,
                                                 SourceLocation RParenLoc,
                                                 ExprArg Op);
 
-  OwningExprResult BuildCompoundLiteralExpr(SourceLocation LParenLoc,
+  ExprResult BuildCompoundLiteralExpr(SourceLocation LParenLoc,
                                             TypeSourceInfo *TInfo,
                                             SourceLocation RParenLoc,
                                             ExprArg InitExpr);
 
-  virtual OwningExprResult ActOnInitList(SourceLocation LParenLoc,
+  virtual ExprResult ActOnInitList(SourceLocation LParenLoc,
                                          MultiExprArg InitList,
                                          SourceLocation RParenLoc);
 
-  virtual OwningExprResult ActOnDesignatedInitializer(Designation &Desig,
+  virtual ExprResult ActOnDesignatedInitializer(Designation &Desig,
                                                       SourceLocation Loc,
                                                       bool GNUSyntax,
-                                                      OwningExprResult Init);
+                                                      ExprResult Init);
 
-  virtual OwningExprResult ActOnBinOp(Scope *S, SourceLocation TokLoc,
+  virtual ExprResult ActOnBinOp(Scope *S, SourceLocation TokLoc,
                                       tok::TokenKind Kind,
                                       ExprArg LHS, ExprArg RHS);
-  OwningExprResult BuildBinOp(Scope *S, SourceLocation OpLoc,
+  ExprResult BuildBinOp(Scope *S, SourceLocation OpLoc,
                               BinaryOperator::Opcode Opc,
                               Expr *lhs, Expr *rhs);
-  OwningExprResult CreateBuiltinBinOp(SourceLocation TokLoc,
+  ExprResult CreateBuiltinBinOp(SourceLocation TokLoc,
                                       unsigned Opc, Expr *lhs, Expr *rhs);
 
   /// ActOnConditionalOp - Parse a ?: operation.  Note that 'LHS' may be null
   /// in the case of a the GNU conditional expr extension.
-  virtual OwningExprResult ActOnConditionalOp(SourceLocation QuestionLoc,
+  virtual ExprResult ActOnConditionalOp(SourceLocation QuestionLoc,
                                               SourceLocation ColonLoc,
                                               ExprArg Cond, ExprArg LHS,
                                               ExprArg RHS);
 
   /// ActOnAddrLabel - Parse the GNU address of label extension: "&&foo".
-  virtual OwningExprResult ActOnAddrLabel(SourceLocation OpLoc,
+  virtual ExprResult ActOnAddrLabel(SourceLocation OpLoc,
                                           SourceLocation LabLoc,
                                           IdentifierInfo *LabelII);
 
-  virtual OwningExprResult ActOnStmtExpr(SourceLocation LPLoc, StmtArg SubStmt,
+  virtual ExprResult ActOnStmtExpr(SourceLocation LPLoc, StmtArg SubStmt,
                                          SourceLocation RPLoc); // "({..})"
 
   /// __builtin_offsetof(type, a.b[123][456].c)
-  OwningExprResult BuildBuiltinOffsetOf(SourceLocation BuiltinLoc,
+  ExprResult BuildBuiltinOffsetOf(SourceLocation BuiltinLoc,
                                         TypeSourceInfo *TInfo,
                                         OffsetOfComponent *CompPtr,
                                         unsigned NumComponents,
                                         SourceLocation RParenLoc);
-  virtual OwningExprResult ActOnBuiltinOffsetOf(Scope *S,
+  virtual ExprResult ActOnBuiltinOffsetOf(Scope *S,
                                                 SourceLocation BuiltinLoc,
                                                 SourceLocation TypeLoc,
                                                 ParsedType Arg1,
@@ -2171,30 +2171,30 @@
                                                 SourceLocation RParenLoc);
 
   // __builtin_types_compatible_p(type1, type2)
-  virtual OwningExprResult ActOnTypesCompatibleExpr(SourceLocation BuiltinLoc,
+  virtual ExprResult ActOnTypesCompatibleExpr(SourceLocation BuiltinLoc,
                                                     ParsedType arg1,
                                                     ParsedType arg2,
                                                     SourceLocation RPLoc);
-  OwningExprResult BuildTypesCompatibleExpr(SourceLocation BuiltinLoc,
+  ExprResult BuildTypesCompatibleExpr(SourceLocation BuiltinLoc,
                                             TypeSourceInfo *argTInfo1,
                                             TypeSourceInfo *argTInfo2,
                                             SourceLocation RPLoc);
 
   // __builtin_choose_expr(constExpr, expr1, expr2)
-  virtual OwningExprResult ActOnChooseExpr(SourceLocation BuiltinLoc,
+  virtual ExprResult ActOnChooseExpr(SourceLocation BuiltinLoc,
                                            ExprArg cond, ExprArg expr1,
                                            ExprArg expr2, SourceLocation RPLoc);
 
   // __builtin_va_arg(expr, type)
-  virtual OwningExprResult ActOnVAArg(SourceLocation BuiltinLoc,
+  virtual ExprResult ActOnVAArg(SourceLocation BuiltinLoc,
                                       ExprArg expr, ParsedType type,
                                       SourceLocation RPLoc);
-  OwningExprResult BuildVAArgExpr(SourceLocation BuiltinLoc,
+  ExprResult BuildVAArgExpr(SourceLocation BuiltinLoc,
                                   ExprArg expr, TypeSourceInfo *TInfo,
                                   SourceLocation RPLoc);
 
   // __null
-  virtual OwningExprResult ActOnGNUNullExpr(SourceLocation TokenLoc);
+  virtual ExprResult ActOnGNUNullExpr(SourceLocation TokenLoc);
 
   //===------------------------- "Block" Extension ------------------------===//
 
@@ -2212,7 +2212,7 @@
 
   /// ActOnBlockStmtExpr - This is called when the body of a block statement
   /// literal was successfully completed.  ^(int x){...}
-  virtual OwningExprResult ActOnBlockStmtExpr(SourceLocation CaretLoc,
+  virtual ExprResult ActOnBlockStmtExpr(SourceLocation CaretLoc,
                                               StmtArg Body, Scope *CurScope);
 
   //===---------------------------- C++ Features --------------------------===//
@@ -2304,7 +2304,7 @@
 
   /// BuildCXXConstructExpr - Creates a complete call to a constructor,
   /// including handling of its default argument expressions.
-  OwningExprResult
+  ExprResult
   BuildCXXConstructExpr(SourceLocation ConstructLoc, QualType DeclInitType,
                         CXXConstructorDecl *Constructor, MultiExprArg Exprs,
                         bool RequiresZeroInit = false,
@@ -2313,7 +2313,7 @@
 
   // FIXME: Can re remove this and have the above BuildCXXConstructExpr check if
   // the constructor can be elidable?
-  OwningExprResult
+  ExprResult
   BuildCXXConstructExpr(SourceLocation ConstructLoc, QualType DeclInitType,
                         CXXConstructorDecl *Constructor, bool Elidable,
                         MultiExprArg Exprs, bool RequiresZeroInit = false,
@@ -2322,7 +2322,7 @@
 
   /// BuildCXXDefaultArgExpr - Creates a CXXDefaultArgExpr, instantiating
   /// the default expr if needed.
-  OwningExprResult BuildCXXDefaultArgExpr(SourceLocation CallLoc,
+  ExprResult BuildCXXDefaultArgExpr(SourceLocation CallLoc,
                                           FunctionDecl *FD,
                                           ParmVarDecl *Param);
 
@@ -2396,7 +2396,7 @@
   /// MaybeBindToTemporary - If the passed in expression has a record type with
   /// a non-trivial destructor, this will return CXXBindTemporaryExpr. Otherwise
   /// it simply returns the passed in expression.
-  OwningExprResult MaybeBindToTemporary(Expr *E);
+  ExprResult MaybeBindToTemporary(Expr *E);
 
   bool CompleteConstructorCall(CXXConstructorDecl *Constructor,
                                MultiExprArg ArgsPtr,
@@ -2410,7 +2410,7 @@
                                        bool EnteringContext);
 
   /// ActOnCXXNamedCast - Parse {dynamic,static,reinterpret,const}_cast's.
-  virtual OwningExprResult ActOnCXXNamedCast(SourceLocation OpLoc,
+  virtual ExprResult ActOnCXXNamedCast(SourceLocation OpLoc,
                                              tok::TokenKind Kind,
                                              SourceLocation LAngleBracketLoc,
                                              ParsedType Ty,
@@ -2419,40 +2419,40 @@
                                              ExprArg E,
                                              SourceLocation RParenLoc);
 
-  OwningExprResult BuildCXXNamedCast(SourceLocation OpLoc,
+  ExprResult BuildCXXNamedCast(SourceLocation OpLoc,
                                      tok::TokenKind Kind,
                                      TypeSourceInfo *Ty,
                                      ExprArg E,
                                      SourceRange AngleBrackets,
                                      SourceRange Parens);
 
-  OwningExprResult BuildCXXTypeId(QualType TypeInfoType,
+  ExprResult BuildCXXTypeId(QualType TypeInfoType,
                                   SourceLocation TypeidLoc,
                                   TypeSourceInfo *Operand,
                                   SourceLocation RParenLoc);
-  OwningExprResult BuildCXXTypeId(QualType TypeInfoType,
+  ExprResult BuildCXXTypeId(QualType TypeInfoType,
                                   SourceLocation TypeidLoc,
                                   ExprArg Operand,
                                   SourceLocation RParenLoc);
 
   /// ActOnCXXTypeid - Parse typeid( something ).
-  virtual OwningExprResult ActOnCXXTypeid(SourceLocation OpLoc,
+  virtual ExprResult ActOnCXXTypeid(SourceLocation OpLoc,
                                           SourceLocation LParenLoc, bool isType,
                                           void *TyOrExpr,
                                           SourceLocation RParenLoc);
 
   //// ActOnCXXThis -  Parse 'this' pointer.
-  virtual OwningExprResult ActOnCXXThis(SourceLocation ThisLoc);
+  virtual ExprResult ActOnCXXThis(SourceLocation ThisLoc);
 
   /// ActOnCXXBoolLiteral - Parse {true,false} literals.
-  virtual OwningExprResult ActOnCXXBoolLiteral(SourceLocation OpLoc,
+  virtual ExprResult ActOnCXXBoolLiteral(SourceLocation OpLoc,
                                                tok::TokenKind Kind);
 
   /// ActOnCXXNullPtrLiteral - Parse 'nullptr'.
-  virtual OwningExprResult ActOnCXXNullPtrLiteral(SourceLocation Loc);
+  virtual ExprResult ActOnCXXNullPtrLiteral(SourceLocation Loc);
 
   //// ActOnCXXThrow -  Parse throw expressions.
-  virtual OwningExprResult ActOnCXXThrow(SourceLocation OpLoc,
+  virtual ExprResult ActOnCXXThrow(SourceLocation OpLoc,
                                          ExprArg expr);
   bool CheckCXXThrowOperand(SourceLocation ThrowLoc, Expr *&E);
 
@@ -2460,7 +2460,7 @@
   /// Can be interpreted either as function-style casting ("int(x)")
   /// or class type construction ("ClassType(x,y,z)")
   /// or creation of a value-initialized type ("int()").
-  virtual OwningExprResult ActOnCXXTypeConstructExpr(SourceRange TypeRange,
+  virtual ExprResult ActOnCXXTypeConstructExpr(SourceRange TypeRange,
                                                      ParsedType TypeRep,
                                                      SourceLocation LParenLoc,
                                                      MultiExprArg Exprs,
@@ -2468,7 +2468,7 @@
                                                      SourceLocation RParenLoc);
 
   /// ActOnCXXNew - Parsed a C++ 'new' expression.
-  virtual OwningExprResult ActOnCXXNew(SourceLocation StartLoc, bool UseGlobal,
+  virtual ExprResult ActOnCXXNew(SourceLocation StartLoc, bool UseGlobal,
                                        SourceLocation PlacementLParen,
                                        MultiExprArg PlacementArgs,
                                        SourceLocation PlacementRParen,
@@ -2476,7 +2476,7 @@
                                        SourceLocation ConstructorLParen,
                                        MultiExprArg ConstructorArgs,
                                        SourceLocation ConstructorRParen);
-  OwningExprResult BuildCXXNew(SourceLocation StartLoc, bool UseGlobal,
+  ExprResult BuildCXXNew(SourceLocation StartLoc, bool UseGlobal,
                                SourceLocation PlacementLParen,
                                MultiExprArg PlacementArgs,
                                SourceLocation PlacementRParen,
@@ -2509,35 +2509,35 @@
                                 DeclarationName Name, FunctionDecl* &Operator);
 
   /// ActOnCXXDelete - Parsed a C++ 'delete' expression
-  virtual OwningExprResult ActOnCXXDelete(SourceLocation StartLoc,
+  virtual ExprResult ActOnCXXDelete(SourceLocation StartLoc,
                                           bool UseGlobal, bool ArrayForm,
                                           ExprArg Operand);
 
   virtual DeclResult ActOnCXXConditionDeclaration(Scope *S,
                                                   Declarator &D);
-  OwningExprResult CheckConditionVariable(VarDecl *ConditionVar,
+  ExprResult CheckConditionVariable(VarDecl *ConditionVar,
                                           SourceLocation StmtLoc,
                                           bool ConvertToBoolean);
 
   /// ActOnUnaryTypeTrait - Parsed one of the unary type trait support
   /// pseudo-functions.
-  virtual OwningExprResult ActOnUnaryTypeTrait(UnaryTypeTrait OTT,
+  virtual ExprResult ActOnUnaryTypeTrait(UnaryTypeTrait OTT,
                                                SourceLocation KWLoc,
                                                SourceLocation LParen,
                                                ParsedType Ty,
                                                SourceLocation RParen);
 
-  virtual OwningExprResult ActOnStartCXXMemberReference(Scope *S,
+  virtual ExprResult ActOnStartCXXMemberReference(Scope *S,
                                                         ExprArg Base,
                                                         SourceLocation OpLoc,
                                                         tok::TokenKind OpKind,
                                                         ParsedType &ObjectType,
                                                    bool &MayBePseudoDestructor);
 
-  OwningExprResult DiagnoseDtorReference(SourceLocation NameLoc,
+  ExprResult DiagnoseDtorReference(SourceLocation NameLoc,
                                          ExprArg MemExpr);
 
-  OwningExprResult BuildPseudoDestructorExpr(ExprArg Base,
+  ExprResult BuildPseudoDestructorExpr(ExprArg Base,
                                              SourceLocation OpLoc,
                                              tok::TokenKind OpKind,
                                              const CXXScopeSpec &SS,
@@ -2547,7 +2547,7 @@
                                      PseudoDestructorTypeStorage DestroyedType,
                                              bool HasTrailingLParen);
 
-  virtual OwningExprResult ActOnPseudoDestructorExpr(Scope *S, ExprArg Base,
+  virtual ExprResult ActOnPseudoDestructorExpr(Scope *S, ExprArg Base,
                                                      SourceLocation OpLoc,
                                                      tok::TokenKind OpKind,
                                                      CXXScopeSpec &SS,
@@ -2561,10 +2561,10 @@
   /// non-empty, will create a new CXXExprWithTemporaries expression.
   /// Otherwise, just returs the passed in expression.
   Expr *MaybeCreateCXXExprWithTemporaries(Expr *SubExpr);
-  OwningExprResult MaybeCreateCXXExprWithTemporaries(OwningExprResult SubExpr);
+  ExprResult MaybeCreateCXXExprWithTemporaries(ExprResult SubExpr);
   FullExpr CreateFullExpr(Expr *SubExpr);
 
-  virtual OwningExprResult ActOnFinishFullExpr(ExprArg Expr);
+  virtual ExprResult ActOnFinishFullExpr(ExprArg Expr);
 
   // Marks SS invalid if it represents an incomplete type.
   bool RequireCompleteDeclContext(CXXScopeSpec &SS, DeclContext *DC);
@@ -3088,11 +3088,11 @@
                                             DeclSpec::TST TagSpec,
                                             SourceLocation TagLoc);
 
-  OwningExprResult BuildTemplateIdExpr(const CXXScopeSpec &SS,
+  ExprResult BuildTemplateIdExpr(const CXXScopeSpec &SS,
                                        LookupResult &R,
                                        bool RequiresADL,
                                const TemplateArgumentListInfo &TemplateArgs);
-  OwningExprResult BuildQualifiedTemplateIdExpr(CXXScopeSpec &SS,
+  ExprResult BuildQualifiedTemplateIdExpr(CXXScopeSpec &SS,
                                const DeclarationNameInfo &NameInfo,
                                const TemplateArgumentListInfo &TemplateArgs);
 
@@ -3228,11 +3228,11 @@
   bool CheckTemplateArgument(TemplateTemplateParmDecl *Param,
                              const TemplateArgumentLoc &Arg);
 
-  OwningExprResult
+  ExprResult
   BuildExpressionFromDeclTemplateArgument(const TemplateArgument &Arg,
                                           QualType ParamType,
                                           SourceLocation Loc);
-  OwningExprResult
+  ExprResult
   BuildExpressionFromIntegralTemplateArgument(const TemplateArgument &Arg,
                                               SourceLocation Loc);
 
@@ -3318,7 +3318,7 @@
                                                     DeclarationName Name);
   bool RebuildNestedNameSpecifierInCurrentInstantiation(CXXScopeSpec &SS);
 
-  OwningExprResult RebuildExprInCurrentInstantiation(Expr *E);
+  ExprResult RebuildExprInCurrentInstantiation(Expr *E);
 
   std::string
   getTemplateArgumentBindingsText(const TemplateParameterList *Params,
@@ -3951,10 +3951,10 @@
                                         DeclarationName Entity);
   ParmVarDecl *SubstParmVarDecl(ParmVarDecl *D,
                             const MultiLevelTemplateArgumentList &TemplateArgs);
-  OwningExprResult SubstExpr(Expr *E,
+  ExprResult SubstExpr(Expr *E,
                             const MultiLevelTemplateArgumentList &TemplateArgs);
 
-  OwningStmtResult SubstStmt(Stmt *S,
+  StmtResult SubstStmt(Stmt *S,
                             const MultiLevelTemplateArgumentList &TemplateArgs);
 
   Decl *SubstDecl(Decl *D, DeclContext *Owner,
@@ -4157,13 +4157,13 @@
   ObjCMethodDecl *LookupPrivateInstanceMethod(Selector Sel,
                                               ObjCInterfaceDecl *ClassDecl);
 
-  OwningExprResult
+  ExprResult
   HandleExprPropertyRefExpr(const ObjCObjectPointerType *OPT,
                             Expr *BaseExpr,
                             DeclarationName MemberName,
                             SourceLocation MemberLoc);
 
-  virtual OwningExprResult
+  virtual ExprResult
   ActOnClassPropertyRefExpr(IdentifierInfo &receiverName,
                             IdentifierInfo &propertyName,
                             SourceLocation receiverNameLoc,
@@ -4176,14 +4176,14 @@
                                              bool HasTrailingDot,
                                              ParsedType &ReceiverType);
 
-  virtual OwningExprResult ActOnSuperMessage(Scope *S, SourceLocation SuperLoc,
+  virtual ExprResult ActOnSuperMessage(Scope *S, SourceLocation SuperLoc,
                                              Selector Sel,
                                              SourceLocation LBracLoc,
                                              SourceLocation SelectorLoc,
                                              SourceLocation RBracLoc,
                                              MultiExprArg Args);
 
-  OwningExprResult BuildClassMessage(TypeSourceInfo *ReceiverTypeInfo,
+  ExprResult BuildClassMessage(TypeSourceInfo *ReceiverTypeInfo,
                                      QualType ReceiverType,
                                      SourceLocation SuperLoc,
                                      Selector Sel,
@@ -4192,7 +4192,7 @@
                                      SourceLocation RBracLoc,
                                      MultiExprArg Args);
 
-  virtual OwningExprResult ActOnClassMessage(Scope *S,
+  virtual ExprResult ActOnClassMessage(Scope *S,
                                              ParsedType Receiver,
                                              Selector Sel,
                                              SourceLocation LBracLoc,
@@ -4200,7 +4200,7 @@
                                              SourceLocation RBracLoc,
                                              MultiExprArg Args);
 
-  OwningExprResult BuildInstanceMessage(ExprArg Receiver,
+  ExprResult BuildInstanceMessage(ExprArg Receiver,
                                         QualType ReceiverType,
                                         SourceLocation SuperLoc,
                                         Selector Sel,
@@ -4209,7 +4209,7 @@
                                         SourceLocation RBracLoc,
                                         MultiExprArg Args);
 
-  virtual OwningExprResult ActOnInstanceMessage(Scope *S,
+  virtual ExprResult ActOnInstanceMessage(Scope *S,
                                                 ExprArg Receiver,
                                                 Selector Sel,
                                                 SourceLocation LBracLoc,
@@ -4604,7 +4604,7 @@
   /// \return true iff there were any errors
   bool CheckBooleanCondition(Expr *&CondExpr, SourceLocation Loc);
 
-  virtual OwningExprResult ActOnBooleanCondition(Scope *S, SourceLocation Loc,
+  virtual ExprResult ActOnBooleanCondition(Scope *S, SourceLocation Loc,
                                                  ExprArg SubExpr);
   
   /// DiagnoseAssignmentAsCondition - Given that an expression is
@@ -4743,7 +4743,7 @@
   bool CheckablePrintfAttr(const FormatAttr *Format, CallExpr *TheCall);
   bool CheckObjCString(Expr *Arg);
 
-  Action::OwningExprResult CheckBuiltinFunctionCall(unsigned BuiltinID,
+  ExprResult CheckBuiltinFunctionCall(unsigned BuiltinID,
                                                     CallExpr *TheCall);
   bool CheckARMBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall);
   bool CheckX86BuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall);
@@ -4754,13 +4754,13 @@
 
 public:
   // Used by C++ template instantiation.
-  Action::OwningExprResult SemaBuiltinShuffleVector(CallExpr *TheCall);
+  ExprResult SemaBuiltinShuffleVector(CallExpr *TheCall);
 
 private:
   bool SemaBuiltinPrefetch(CallExpr *TheCall);
   bool SemaBuiltinObjectSize(CallExpr *TheCall);
   bool SemaBuiltinLongjmp(CallExpr *TheCall);
-  OwningExprResult SemaBuiltinAtomicOverloaded(OwningExprResult TheCallResult);
+  ExprResult SemaBuiltinAtomicOverloaded(ExprResult TheCallResult);
   bool SemaBuiltinConstantArg(CallExpr *TheCall, int ArgNum,
                               llvm::APSInt &Result);
 

Modified: cfe/trunk/lib/Parse/ParseCXXInlineMethods.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseCXXInlineMethods.cpp?rev=111903&r1=111902&r2=111903&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseCXXInlineMethods.cpp (original)
+++ cfe/trunk/lib/Parse/ParseCXXInlineMethods.cpp Tue Aug 24 01:29:42 2010
@@ -138,7 +138,7 @@
         assert(Tok.is(tok::equal) && "Default argument not starting with '='");
         SourceLocation EqualLoc = ConsumeToken();
 
-        OwningExprResult DefArgResult(ParseAssignmentExpression());
+        ExprResult DefArgResult(ParseAssignmentExpression());
         if (DefArgResult.isInvalid())
           Actions.ActOnParamDefaultArgumentError(LM.DefaultArgs[I].Param);
         else {

Modified: cfe/trunk/lib/Parse/ParseDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDecl.cpp?rev=111903&r1=111902&r2=111903&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseDecl.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDecl.cpp Tue Aug 24 01:29:42 2010
@@ -131,7 +131,7 @@
 
             // now parse the non-empty comma separated list of expressions
             while (1) {
-              OwningExprResult ArgExpr(ParseAssignmentExpression());
+              ExprResult ArgExpr(ParseAssignmentExpression());
               if (ArgExpr.isInvalid()) {
                 ArgExprsOk = false;
                 SkipUntil(tok::r_paren);
@@ -191,7 +191,7 @@
 
             // now parse the list of expressions
             while (1) {
-              OwningExprResult ArgExpr(ParseAssignmentExpression());
+              ExprResult ArgExpr(ParseAssignmentExpression());
               if (ArgExpr.isInvalid()) {
                 ArgExprsOk = false;
                 SkipUntil(tok::r_paren);
@@ -256,7 +256,7 @@
       ConsumeParen();
       // FIXME: This doesn't parse __declspec(property(get=get_func_name))
       // correctly.
-      OwningExprResult ArgExpr(ParseAssignmentExpression());
+      ExprResult ArgExpr(ParseAssignmentExpression());
       if (!ArgExpr.isInvalid()) {
         Expr *ExprList = ArgExpr.take();
         CurrAttr = new AttributeList(AttrName, AttrNameLoc, 0, AttrNameLoc, 0,
@@ -514,7 +514,7 @@
   // If a simple-asm-expr is present, parse it.
   if (Tok.is(tok::kw_asm)) {
     SourceLocation Loc;
-    OwningExprResult AsmLabel(ParseSimpleAsm(&Loc));
+    ExprResult AsmLabel(ParseSimpleAsm(&Loc));
     if (AsmLabel.isInvalid()) {
       SkipUntil(tok::semi, true, true);
       return 0;
@@ -582,7 +582,7 @@
         return ThisDecl;
       }
       
-      OwningExprResult Init(ParseInitializer());
+      ExprResult Init(ParseInitializer());
 
       if (getLang().CPlusPlus && D.getCXXScopeSpec().isSet()) {
         Actions.ActOnCXXExitDeclInitializer(getCurScope(), ThisDecl);
@@ -1756,7 +1756,7 @@
 
     if (Tok.is(tok::colon)) {
       ConsumeToken();
-      OwningExprResult Res(ParseConstantExpression());
+      ExprResult Res(ParseConstantExpression());
       if (Res.isInvalid())
         SkipUntil(tok::semi, true, true);
       else
@@ -2078,7 +2078,7 @@
     SourceLocation IdentLoc = ConsumeToken();
 
     SourceLocation EqualLoc;
-    OwningExprResult AssignedVal;
+    ExprResult AssignedVal;
     if (Tok.is(tok::equal)) {
       EqualLoc = ConsumeToken();
       AssignedVal = ParseConstantExpression();
@@ -3131,7 +3131,7 @@
           // Consume the '='.
           ConsumeToken();
 
-          OwningExprResult DefArgResult(ParseAssignmentExpression());
+          ExprResult DefArgResult(ParseAssignmentExpression());
           if (DefArgResult.isInvalid()) {
             Actions.ActOnParamDefaultArgumentError(Param);
             SkipUntil(tok::comma, tok::r_paren, true, true);
@@ -3309,7 +3309,7 @@
     }
     
     // Remember that we parsed the empty array type.
-    OwningExprResult NumElements;
+    ExprResult NumElements;
     D.AddTypeInfo(DeclaratorChunk::getArray(0, false, false, 0,
                                             StartLoc, EndLoc),
                   EndLoc);
@@ -3317,7 +3317,7 @@
   } else if (Tok.getKind() == tok::numeric_constant &&
              GetLookAheadToken(1).is(tok::r_square)) {
     // [4] is very common.  Parse the numeric constant expression.
-    OwningExprResult ExprRes(Actions.ActOnNumericConstant(Tok));
+    ExprResult ExprRes(Actions.ActOnNumericConstant(Tok));
     ConsumeToken();
 
     SourceLocation EndLoc = MatchRHSPunctuation(tok::r_square, StartLoc);
@@ -3355,7 +3355,7 @@
 
   // Handle "direct-declarator [ type-qual-list[opt] * ]".
   bool isStar = false;
-  OwningExprResult NumElements;
+  ExprResult NumElements;
 
   // Handle the case where we have '[*]' as the array size.  However, a leading
   // star could be the start of an expression, for example 'X[*p + 4]'.  Verify
@@ -3422,7 +3422,7 @@
   bool isCastExpr;
   ParsedType CastTy;
   SourceRange CastRange;
-  OwningExprResult Operand = ParseExprAfterTypeofSizeofAlignof(OpTok,
+  ExprResult Operand = ParseExprAfterTypeofSizeofAlignof(OpTok,
                                                                isCastExpr,
                                                                CastTy,
                                                                CastRange);

Modified: cfe/trunk/lib/Parse/ParseDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDeclCXX.cpp?rev=111903&r1=111902&r2=111903&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseDeclCXX.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDeclCXX.cpp Tue Aug 24 01:29:42 2010
@@ -389,7 +389,7 @@
 
   SourceLocation LParenLoc = ConsumeParen();
 
-  OwningExprResult AssertExpr(ParseConstantExpression());
+  ExprResult AssertExpr(ParseConstantExpression());
   if (AssertExpr.isInvalid()) {
     SkipUntil(tok::semi);
     return 0;
@@ -404,7 +404,7 @@
     return 0;
   }
 
-  OwningExprResult AssertMessage(ParseStringLiteralExpression());
+  ExprResult AssertMessage(ParseStringLiteralExpression());
   if (AssertMessage.isInvalid())
     return 0;
 
@@ -440,7 +440,7 @@
   //   The operand of the decltype specifier is an unevaluated operand.
   EnterExpressionEvaluationContext Unevaluated(Actions,
                                                Action::Unevaluated);
-  OwningExprResult Result = ParseExpression();
+  ExprResult Result = ParseExpression();
   if (Result.isInvalid()) {
     SkipUntil(tok::r_paren);
     return;
@@ -1404,8 +1404,8 @@
   //   member-declarator-list ',' member-declarator
 
   llvm::SmallVector<Decl *, 8> DeclsInGroup;
-  OwningExprResult BitfieldSize;
-  OwningExprResult Init;
+  ExprResult BitfieldSize;
+  ExprResult Init;
   bool Deleted = false;
 
   while (1) {
@@ -1444,7 +1444,7 @@
     // If a simple-asm-expr is present, parse it.
     if (Tok.is(tok::kw_asm)) {
       SourceLocation Loc;
-      OwningExprResult AsmLabel(ParseSimpleAsm(&Loc));
+      ExprResult AsmLabel(ParseSimpleAsm(&Loc));
       if (AsmLabel.isInvalid())
         SkipUntil(tok::comma, true, true);
  
@@ -2015,7 +2015,7 @@
         }
         SourceLocation ParamLoc = ConsumeParen();
 
-        OwningExprResult ArgExpr = ParseCXX0XAlignArgument(ParamLoc);
+        ExprResult ArgExpr = ParseCXX0XAlignArgument(ParamLoc);
 
         MatchRHSPunctuation(tok::r_paren, ParamLoc);
 
@@ -2060,7 +2060,7 @@
 ///
 /// [C++0x] 'align' '(' type-id ')'
 /// [C++0x] 'align' '(' assignment-expression ')'
-Parser::OwningExprResult Parser::ParseCXX0XAlignArgument(SourceLocation Start) {
+ExprResult Parser::ParseCXX0XAlignArgument(SourceLocation Start) {
   if (isTypeIdInParens()) {
     EnterExpressionEvaluationContext Unevaluated(Actions,
                                                   Action::Unevaluated);

Modified: cfe/trunk/lib/Parse/ParseExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseExpr.cpp?rev=111903&r1=111902&r2=111903&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseExpr.cpp (original)
+++ cfe/trunk/lib/Parse/ParseExpr.cpp Tue Aug 24 01:29:42 2010
@@ -175,8 +175,8 @@
 ///         assignment-expression
 ///         expression ',' assignment-expression
 ///
-Parser::OwningExprResult Parser::ParseExpression() {
-  OwningExprResult LHS(ParseAssignmentExpression());
+ExprResult Parser::ParseExpression() {
+  ExprResult LHS(ParseAssignmentExpression());
   if (LHS.isInvalid()) return move(LHS);
 
   return ParseRHSOfBinaryExpression(move(LHS), prec::Comma);
@@ -187,9 +187,9 @@
 /// routine is necessary to disambiguate @try-statement from,
 /// for example, @encode-expression.
 ///
-Parser::OwningExprResult
+ExprResult
 Parser::ParseExpressionWithLeadingAt(SourceLocation AtLoc) {
-  OwningExprResult LHS(ParseObjCAtExpression(AtLoc));
+  ExprResult LHS(ParseObjCAtExpression(AtLoc));
   if (LHS.isInvalid()) return move(LHS);
 
   return ParseRHSOfBinaryExpression(move(LHS), prec::Comma);
@@ -198,9 +198,9 @@
 /// This routine is called when a leading '__extension__' is seen and
 /// consumed.  This is necessary because the token gets consumed in the
 /// process of disambiguating between an expression and a declaration.
-Parser::OwningExprResult
+ExprResult
 Parser::ParseExpressionWithLeadingExtension(SourceLocation ExtLoc) {
-  OwningExprResult LHS(true);
+  ExprResult LHS(true);
   {
     // Silence extension warnings in the sub-expression
     ExtensionRAIIObject O(Diags);
@@ -218,7 +218,7 @@
 
 /// ParseAssignmentExpression - Parse an expr that doesn't include commas.
 ///
-Parser::OwningExprResult Parser::ParseAssignmentExpression() {
+ExprResult Parser::ParseAssignmentExpression() {
   if (Tok.is(tok::code_completion)) {
     Actions.CodeCompleteOrdinaryName(getCurScope(), Action::PCC_Expression);
     ConsumeCodeCompletionToken();
@@ -227,7 +227,7 @@
   if (Tok.is(tok::kw_throw))
     return ParseThrowExpression();
 
-  OwningExprResult LHS(ParseCastExpression(false));
+  ExprResult LHS(ParseCastExpression(false));
   if (LHS.isInvalid()) return move(LHS);
 
   return ParseRHSOfBinaryExpression(LHS.take(), prec::Assignment);
@@ -241,12 +241,12 @@
 ///
 /// Since this handles full assignment-expression's, it handles postfix
 /// expressions and other binary operators for these expressions as well.
-Parser::OwningExprResult
+ExprResult
 Parser::ParseAssignmentExprWithObjCMessageExprStart(SourceLocation LBracLoc,
                                                     SourceLocation SuperLoc,
                                                     ParsedType ReceiverType,
                                                     Expr *ReceiverExpr) {
-  OwningExprResult R
+  ExprResult R
     = ParseObjCMessageExpressionBody(LBracLoc, SuperLoc,
                                      ReceiverType, ReceiverExpr);
   if (R.isInvalid()) return move(R);
@@ -256,14 +256,14 @@
 }
 
 
-Parser::OwningExprResult Parser::ParseConstantExpression() {
+ExprResult Parser::ParseConstantExpression() {
   // C++ [basic.def.odr]p2:
   //   An expression is potentially evaluated unless it appears where an
   //   integral constant expression is required (see 5.19) [...].
   EnterExpressionEvaluationContext Unevaluated(Actions,
                                                Action::Unevaluated);
 
-  OwningExprResult LHS(ParseCastExpression(false));
+  ExprResult LHS(ParseCastExpression(false));
   if (LHS.isInvalid()) return move(LHS);
 
   return ParseRHSOfBinaryExpression(LHS.take(), prec::Conditional);
@@ -271,8 +271,8 @@
 
 /// ParseRHSOfBinaryExpression - Parse a binary expression that starts with
 /// LHS and has a precedence of at least MinPrec.
-Parser::OwningExprResult
-Parser::ParseRHSOfBinaryExpression(OwningExprResult LHS, prec::Level MinPrec) {
+ExprResult
+Parser::ParseRHSOfBinaryExpression(ExprResult LHS, prec::Level MinPrec) {
   prec::Level NextTokPrec = getBinOpPrecedence(Tok.getKind(),
                                                GreaterThanIsOperator,
                                                getLang().CPlusPlus0x);
@@ -290,7 +290,7 @@
     ConsumeToken();
 
     // Special case handling for the ternary operator.
-    OwningExprResult TernaryMiddle(true);
+    ExprResult TernaryMiddle(true);
     if (NextTokPrec == prec::Conditional) {
       if (Tok.isNot(tok::colon)) {
         // Don't parse FOO:BAR as if it were a typo for FOO::BAR.
@@ -357,7 +357,7 @@
     // Therefore we need some special-casing here.
     // Also note that the third operand of the conditional operator is
     // an assignment-expression in C++.
-    OwningExprResult RHS;
+    ExprResult RHS;
     if (getLang().CPlusPlus && NextTokPrec <= prec::Conditional)
       RHS = ParseAssignmentExpression();
     else
@@ -421,11 +421,11 @@
 /// id-expression that is the operand of address-of gets special treatment
 /// due to member pointers.
 ///
-Parser::OwningExprResult Parser::ParseCastExpression(bool isUnaryExpression,
+ExprResult Parser::ParseCastExpression(bool isUnaryExpression,
                                                      bool isAddressOfOperand,
                                                      ParsedType TypeOfCast) {
   bool NotCastExpr;
-  OwningExprResult Res = ParseCastExpression(isUnaryExpression,
+  ExprResult Res = ParseCastExpression(isUnaryExpression,
                                              isAddressOfOperand,
                                              NotCastExpr,
                                              TypeOfCast);
@@ -545,11 +545,11 @@
 /// [GNU] binary-type-trait:
 ///                   '__is_base_of'                          [TODO]
 ///
-Parser::OwningExprResult Parser::ParseCastExpression(bool isUnaryExpression,
+ExprResult Parser::ParseCastExpression(bool isUnaryExpression,
                                                      bool isAddressOfOperand,
                                                      bool &NotCastExpr,
                                                      ParsedType TypeOfCast) {
-  OwningExprResult Res;
+  ExprResult Res;
   tok::TokenKind SavedKind = Tok.getKind();
   NotCastExpr = false;
 
@@ -942,8 +942,8 @@
 ///         argument-expression
 ///         argument-expression-list ',' assignment-expression
 ///
-Parser::OwningExprResult
-Parser::ParsePostfixExpressionSuffix(OwningExprResult LHS) {
+ExprResult
+Parser::ParsePostfixExpressionSuffix(ExprResult LHS) {
   // Now that the primary-expression piece of the postfix-expression has been
   // parsed, see if there are any postfix-expression pieces here.
   SourceLocation Loc;
@@ -963,7 +963,7 @@
         return move(LHS);
           
       Loc = ConsumeBracket();
-      OwningExprResult Idx(ParseExpression());
+      ExprResult Idx(ParseExpression());
 
       SourceLocation RLoc = Tok.getLocation();
 
@@ -1105,7 +1105,7 @@
 ///           typeof ( type-name )
 /// [GNU/C++] typeof unary-expression
 ///
-Parser::OwningExprResult
+ExprResult
 Parser::ParseExprAfterTypeofSizeofAlignof(const Token &OpTok,
                                           bool &isCastExpr,
                                           ParsedType &CastTy,
@@ -1115,7 +1115,7 @@
           OpTok.is(tok::kw___alignof) || OpTok.is(tok::kw_alignof)) &&
           "Not a typeof/sizeof/alignof expression!");
 
-  OwningExprResult Operand;
+  ExprResult Operand;
 
   // If the operand doesn't start with an '(', it must be an expression.
   if (Tok.isNot(tok::l_paren)) {
@@ -1183,7 +1183,7 @@
 /// [GNU]   '__alignof' unary-expression
 /// [GNU]   '__alignof' '(' type-name ')'
 /// [C++0x] 'alignof' '(' type-id ')'
-Parser::OwningExprResult Parser::ParseSizeofAlignofExpression() {
+ExprResult Parser::ParseSizeofAlignofExpression() {
   assert((Tok.is(tok::kw_sizeof) || Tok.is(tok::kw___alignof)
           || Tok.is(tok::kw_alignof)) &&
          "Not a sizeof/alignof expression!");
@@ -1193,7 +1193,7 @@
   bool isCastExpr;
   ParsedType CastTy;
   SourceRange CastRange;
-  OwningExprResult Operand = ParseExprAfterTypeofSizeofAlignof(OpTok,
+  ExprResult Operand = ParseExprAfterTypeofSizeofAlignof(OpTok,
                                                                isCastExpr,
                                                                CastTy,
                                                                CastRange);
@@ -1228,8 +1228,8 @@
 /// [GNU]   offsetof-member-designator '.' identifier
 /// [GNU]   offsetof-member-designator '[' expression ']'
 ///
-Parser::OwningExprResult Parser::ParseBuiltinPrimaryExpression() {
-  OwningExprResult Res;
+ExprResult Parser::ParseBuiltinPrimaryExpression() {
+  ExprResult Res;
   const IdentifierInfo *BuiltinII = Tok.getIdentifierInfo();
 
   tok::TokenKind T = Tok.getKind();
@@ -1246,7 +1246,7 @@
   switch (T) {
   default: assert(0 && "Not a builtin primary expression!");
   case tok::kw___builtin_va_arg: {
-    OwningExprResult Expr(ParseAssignmentExpression());
+    ExprResult Expr(ParseAssignmentExpression());
     if (Expr.isInvalid()) {
       SkipUntil(tok::r_paren);
       return ExprError();
@@ -1340,7 +1340,7 @@
     break;
   }
   case tok::kw___builtin_choose_expr: {
-    OwningExprResult Cond(ParseAssignmentExpression());
+    ExprResult Cond(ParseAssignmentExpression());
     if (Cond.isInvalid()) {
       SkipUntil(tok::r_paren);
       return move(Cond);
@@ -1348,7 +1348,7 @@
     if (ExpectAndConsume(tok::comma, diag::err_expected_comma, "",tok::r_paren))
       return ExprError();
 
-    OwningExprResult Expr1(ParseAssignmentExpression());
+    ExprResult Expr1(ParseAssignmentExpression());
     if (Expr1.isInvalid()) {
       SkipUntil(tok::r_paren);
       return move(Expr1);
@@ -1356,7 +1356,7 @@
     if (ExpectAndConsume(tok::comma, diag::err_expected_comma, "",tok::r_paren))
       return ExprError();
 
-    OwningExprResult Expr2(ParseAssignmentExpression());
+    ExprResult Expr2(ParseAssignmentExpression());
     if (Expr2.isInvalid()) {
       SkipUntil(tok::r_paren);
       return move(Expr2);
@@ -1412,20 +1412,20 @@
 ///       cast-expression: [C99 6.5.4]
 ///         '(' type-name ')' cast-expression
 ///
-Parser::OwningExprResult
+ExprResult
 Parser::ParseParenExpression(ParenParseOption &ExprType, bool stopIfCastExpr,
                              ParsedType TypeOfCast, ParsedType &CastTy,
                              SourceLocation &RParenLoc) {
   assert(Tok.is(tok::l_paren) && "Not a paren expr!");
   GreaterThanIsOperatorScope G(GreaterThanIsOperator, true);
   SourceLocation OpenLoc = ConsumeParen();
-  OwningExprResult Result(true);
+  ExprResult Result(true);
   bool isAmbiguousTypeId;
   CastTy = ParsedType();
 
   if (ExprType >= CompoundStmt && Tok.is(tok::l_brace)) {
     Diag(Tok, diag::ext_gnu_statement_expr);
-    OwningStmtResult Stmt(ParseCompoundStatement(0, true));
+    StmtResult Stmt(ParseCompoundStatement(0, true));
     ExprType = CompoundStmt;
 
     // If the substmt parsed correctly, build the AST node.
@@ -1470,7 +1470,7 @@
       // Note that this doesn't parse the subsequent cast-expression, it just
       // returns the parsed type to the callee.
       if (stopIfCastExpr)
-        return OwningExprResult();
+        return ExprResult();
       
       // Reject the cast of super idiom in ObjC.
       if (Tok.is(tok::identifier) && getLang().ObjC1 &&
@@ -1531,14 +1531,14 @@
 ///         '(' type-name ')' '{' initializer-list '}'
 ///         '(' type-name ')' '{' initializer-list ',' '}'
 ///
-Parser::OwningExprResult
+ExprResult
 Parser::ParseCompoundLiteralExpression(ParsedType Ty,
                                        SourceLocation LParenLoc,
                                        SourceLocation RParenLoc) {
   assert(Tok.is(tok::l_brace) && "Not a compound literal!");
   if (!getLang().C99)   // Compound literals don't exist in C90.
     Diag(LParenLoc, diag::ext_c99_compound_literal);
-  OwningExprResult Result = ParseInitializer();
+  ExprResult Result = ParseInitializer();
   if (!Result.isInvalid() && Ty)
     return Actions.ActOnCompoundLiteral(LParenLoc, Ty, RParenLoc, Result.take());
   return move(Result);
@@ -1550,7 +1550,7 @@
 ///
 ///       primary-expression: [C99 6.5.1]
 ///         string-literal
-Parser::OwningExprResult Parser::ParseStringLiteralExpression() {
+ExprResult Parser::ParseStringLiteralExpression() {
   assert(isTokenStringLiteral() && "Not a string literal!");
 
   // String concat.  Note that keywords like __func__ and __FUNCTION__ are not
@@ -1590,7 +1590,7 @@
       ConsumeCodeCompletionToken();
     }
     
-    OwningExprResult Expr(ParseAssignmentExpression());
+    ExprResult Expr(ParseAssignmentExpression());
     if (Expr.isInvalid())
       return true;
 
@@ -1640,7 +1640,7 @@
 /// [clang] block-args:
 /// [clang]   '(' parameter-list ')'
 ///
-Parser::OwningExprResult Parser::ParseBlockLiteralExpression() {
+ExprResult Parser::ParseBlockLiteralExpression() {
   assert(Tok.is(tok::caret) && "block literal starts with ^");
   SourceLocation CaretLoc = ConsumeToken();
 
@@ -1715,7 +1715,7 @@
   }
 
 
-  OwningExprResult Result(true);
+  ExprResult Result(true);
   if (!Tok.is(tok::l_brace)) {
     // Saw something like: ^expr
     Diag(Tok, diag::err_expected_expression);
@@ -1723,7 +1723,7 @@
     return ExprError();
   }
 
-  OwningStmtResult Stmt(ParseCompoundStatementBody());
+  StmtResult Stmt(ParseCompoundStatementBody());
   if (!Stmt.isInvalid())
     Result = Actions.ActOnBlockStmtExpr(CaretLoc, Stmt.take(), getCurScope());
   else

Modified: cfe/trunk/lib/Parse/ParseExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseExprCXX.cpp?rev=111903&r1=111902&r2=111903&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseExprCXX.cpp (original)
+++ cfe/trunk/lib/Parse/ParseExprCXX.cpp Tue Aug 24 01:29:42 2010
@@ -397,7 +397,7 @@
 /// the only place where a qualified-id naming a non-static class member may
 /// appear.
 ///
-Parser::OwningExprResult Parser::ParseCXXIdExpression(bool isAddressOfOperand) {
+ExprResult Parser::ParseCXXIdExpression(bool isAddressOfOperand) {
   // qualified-id:
   //   '::'[opt] nested-name-specifier 'template'[opt] unqualified-id
   //   '::' unqualified-id
@@ -446,7 +446,7 @@
 ///         'reinterpret_cast' '<' type-name '>' '(' expression ')'
 ///         'const_cast' '<' type-name '>' '(' expression ')'
 ///
-Parser::OwningExprResult Parser::ParseCXXCasts() {
+ExprResult Parser::ParseCXXCasts() {
   tok::TokenKind Kind = Tok.getKind();
   const char *CastName = 0;     // For error messages
 
@@ -475,7 +475,7 @@
   if (ExpectAndConsume(tok::l_paren, diag::err_expected_lparen_after, CastName))
     return ExprError();
 
-  OwningExprResult Result = ParseExpression();
+  ExprResult Result = ParseExpression();
 
   // Match the ')'.
   RParenLoc = MatchRHSPunctuation(tok::r_paren, LParenLoc);
@@ -495,7 +495,7 @@
 ///         'typeid' '(' expression ')'
 ///         'typeid' '(' type-id ')'
 ///
-Parser::OwningExprResult Parser::ParseCXXTypeid() {
+ExprResult Parser::ParseCXXTypeid() {
   assert(Tok.is(tok::kw_typeid) && "Not 'typeid'!");
 
   SourceLocation OpLoc = ConsumeToken();
@@ -507,7 +507,7 @@
       "typeid"))
     return ExprError();
 
-  OwningExprResult Result;
+  ExprResult Result;
 
   if (isTypeIdInParens()) {
     TypeResult Ty = ParseTypeName();
@@ -561,7 +561,7 @@
 ///                 ~type-name 
 ///         ::[opt] nested-name-specifier[opt] ~type-name
 ///       
-Parser::OwningExprResult 
+ExprResult 
 Parser::ParseCXXPseudoDestructor(ExprArg Base, SourceLocation OpLoc,
                                  tok::TokenKind OpKind,
                                  CXXScopeSpec &SS,
@@ -625,7 +625,7 @@
 ///       boolean-literal: [C++ 2.13.5]
 ///         'true'
 ///         'false'
-Parser::OwningExprResult Parser::ParseCXXBoolLiteral() {
+ExprResult Parser::ParseCXXBoolLiteral() {
   tok::TokenKind Kind = Tok.getKind();
   return Actions.ActOnCXXBoolLiteral(ConsumeToken(), Kind);
 }
@@ -634,7 +634,7 @@
 ///
 ///       throw-expression: [C++ 15]
 ///         'throw' assignment-expression[opt]
-Parser::OwningExprResult Parser::ParseThrowExpression() {
+ExprResult Parser::ParseThrowExpression() {
   assert(Tok.is(tok::kw_throw) && "Not throw!");
   SourceLocation ThrowLoc = ConsumeToken();           // Eat the throw token.
 
@@ -651,7 +651,7 @@
     return Actions.ActOnCXXThrow(ThrowLoc, 0);
 
   default:
-    OwningExprResult Expr(ParseAssignmentExpression());
+    ExprResult Expr(ParseAssignmentExpression());
     if (Expr.isInvalid()) return move(Expr);
     return Actions.ActOnCXXThrow(ThrowLoc, Expr.take());
   }
@@ -662,7 +662,7 @@
 /// C++ 9.3.2: In the body of a non-static member function, the keyword this is
 /// a non-lvalue expression whose value is the address of the object for which
 /// the function is called.
-Parser::OwningExprResult Parser::ParseCXXThis() {
+ExprResult Parser::ParseCXXThis() {
   assert(Tok.is(tok::kw_this) && "Not 'this'!");
   SourceLocation ThisLoc = ConsumeToken();
   return Actions.ActOnCXXThis(ThisLoc);
@@ -677,7 +677,7 @@
 ///         simple-type-specifier '(' expression-list[opt] ')'      [C++ 5.2.3]
 ///         typename-specifier '(' expression-list[opt] ')'         [TODO]
 ///
-Parser::OwningExprResult
+ExprResult
 Parser::ParseCXXTypeConstructExpression(const DeclSpec &DS) {
   Declarator DeclaratorInfo(DS, Declarator::TypeNameContext);
   ParsedType TypeRep = Actions.ActOnTypeName(getCurScope(), DeclaratorInfo).get();
@@ -730,8 +730,8 @@
 /// converted to a boolean value.
 ///
 /// \returns true if there was a parsing, false otherwise.
-bool Parser::ParseCXXCondition(OwningExprResult &ExprResult,
-                               Decl *&DeclResult,
+bool Parser::ParseCXXCondition(ExprResult &ExprOut,
+                               Decl *&DeclOut,
                                SourceLocation Loc,
                                bool ConvertToBoolean) {
   if (Tok.is(tok::code_completion)) {
@@ -741,16 +741,16 @@
 
   if (!isCXXConditionDeclaration()) {
     // Parse the expression.
-    ExprResult = ParseExpression(); // expression
-    DeclResult = 0;
-    if (ExprResult.isInvalid())
+    ExprOut = ParseExpression(); // expression
+    DeclOut = 0;
+    if (ExprOut.isInvalid())
       return true;
 
     // If required, convert to a boolean value.
     if (ConvertToBoolean)
-      ExprResult
-        = Actions.ActOnBooleanCondition(getCurScope(), Loc, ExprResult.take());
-    return ExprResult.isInvalid();
+      ExprOut
+        = Actions.ActOnBooleanCondition(getCurScope(), Loc, ExprOut.get());
+    return ExprOut.isInvalid();
   }
 
   // type-specifier-seq
@@ -764,7 +764,7 @@
   // simple-asm-expr[opt]
   if (Tok.is(tok::kw_asm)) {
     SourceLocation Loc;
-    OwningExprResult AsmLabel(ParseSimpleAsm(&Loc));
+    ExprResult AsmLabel(ParseSimpleAsm(&Loc));
     if (AsmLabel.isInvalid()) {
       SkipUntil(tok::semi);
       return true;
@@ -781,17 +781,17 @@
   }
 
   // Type-check the declaration itself.
-  Action::DeclResult Dcl = Actions.ActOnCXXConditionDeclaration(getCurScope(), 
+  DeclResult Dcl = Actions.ActOnCXXConditionDeclaration(getCurScope(), 
                                                                 DeclaratorInfo);
-  DeclResult = Dcl.get();
-  ExprResult = ExprError();
+  DeclOut = Dcl.get();
+  ExprOut = ExprError();
   
   // '=' assignment-expression
   if (Tok.is(tok::equal)) {
     SourceLocation EqualLoc = ConsumeToken();
-    OwningExprResult AssignExpr(ParseAssignmentExpression());
+    ExprResult AssignExpr(ParseAssignmentExpression());
     if (!AssignExpr.isInvalid()) 
-      Actions.AddInitializerToDecl(DeclResult, AssignExpr.take());
+      Actions.AddInitializerToDecl(DeclOut, AssignExpr.take());
   } else {
     // FIXME: C++0x allows a braced-init-list
     Diag(Tok, diag::err_expected_equal_after_declarator);
@@ -1566,7 +1566,7 @@
 ///                   '(' expression-list[opt] ')'
 /// [C++0x]           braced-init-list                                   [TODO]
 ///
-Parser::OwningExprResult
+ExprResult
 Parser::ParseCXXNewExpression(bool UseGlobal, SourceLocation Start) {
   assert(Tok.is(tok::kw_new) && "expected 'new' token");
   ConsumeToken();   // Consume 'new'
@@ -1670,7 +1670,7 @@
   bool first = true;
   while (Tok.is(tok::l_square)) {
     SourceLocation LLoc = ConsumeBracket();
-    OwningExprResult Size(first ? ParseExpression()
+    ExprResult Size(first ? ParseExpression()
                                 : ParseConstantExpression());
     if (Size.isInvalid()) {
       // Recover
@@ -1727,7 +1727,7 @@
 ///        delete-expression:
 ///                   '::'[opt] 'delete' cast-expression
 ///                   '::'[opt] 'delete' '[' ']' cast-expression
-Parser::OwningExprResult
+ExprResult
 Parser::ParseCXXDeleteExpression(bool UseGlobal, SourceLocation Start) {
   assert(Tok.is(tok::kw_delete) && "Expected 'delete' keyword");
   ConsumeToken(); // Consume 'delete'
@@ -1742,7 +1742,7 @@
       return ExprError();
   }
 
-  OwningExprResult Operand(ParseCastExpression(false));
+  ExprResult Operand(ParseCastExpression(false));
   if (Operand.isInvalid())
     return move(Operand);
 
@@ -1778,7 +1778,7 @@
 ///       primary-expression:
 /// [GNU]             unary-type-trait '(' type-id ')'
 ///
-Parser::OwningExprResult Parser::ParseUnaryTypeTrait() {
+ExprResult Parser::ParseUnaryTypeTrait() {
   UnaryTypeTrait UTT = UnaryTypeTraitFromTokKind(Tok.getKind());
   SourceLocation Loc = ConsumeToken();
 
@@ -1802,7 +1802,7 @@
 /// ParseCXXAmbiguousParenExpression - We have parsed the left paren of a
 /// parenthesized ambiguous type-id. This uses tentative parsing to disambiguate
 /// based on the context past the parens.
-Parser::OwningExprResult
+ExprResult
 Parser::ParseCXXAmbiguousParenExpression(ParenParseOption &ExprType,
                                          ParsedType &CastTy,
                                          SourceLocation LParenLoc,
@@ -1811,7 +1811,7 @@
   assert(ExprType == CastExpr && "Compound literals are not ambiguous!");
   assert(isTypeIdInParens() && "Not a type-id!");
 
-  OwningExprResult Result(true);
+  ExprResult Result(true);
   CastTy = ParsedType();
 
   // We need to disambiguate a very ugly part of the C++ syntax:

Modified: cfe/trunk/lib/Parse/ParseInit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseInit.cpp?rev=111903&r1=111902&r2=111903&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseInit.cpp (original)
+++ cfe/trunk/lib/Parse/ParseInit.cpp Tue Aug 24 01:29:42 2010
@@ -71,7 +71,7 @@
 /// initializer (because it is an expression).  We need to consider this case
 /// when parsing array designators.
 ///
-Parser::OwningExprResult Parser::ParseInitializerWithPotentialDesignator() {
+ExprResult Parser::ParseInitializerWithPotentialDesignator() {
 
   // If this is the old-style GNU extension:
   //   designation ::= identifier ':'
@@ -137,7 +137,7 @@
     //   [4][foo bar]      -> obsolete GNU designation with objc message send.
     //
     SourceLocation StartLoc = ConsumeBracket();
-    OwningExprResult Idx;
+    ExprResult Idx;
 
     // If Objective-C is enabled and this is a typename (class message
     // send) or send to 'super', parse this as a message send
@@ -176,7 +176,7 @@
       // whether we have a message send or an array designator; just
       // adopt the expression for further analysis below.
       // FIXME: potentially-potentially evaluated expression above?
-      Idx = OwningExprResult(static_cast<Expr*>(TypeOrExpr));
+      Idx = ExprResult(static_cast<Expr*>(TypeOrExpr));
     } else if (getLang().ObjC1 && Tok.is(tok::identifier)) {
       IdentifierInfo *II = Tok.getIdentifierInfo();
       SourceLocation IILoc = Tok.getLocation();
@@ -252,7 +252,7 @@
       Diag(Tok, diag::ext_gnu_array_range);
       SourceLocation EllipsisLoc = ConsumeToken();
 
-      OwningExprResult RHS(ParseConstantExpression());
+      ExprResult RHS(ParseConstantExpression());
       if (RHS.isInvalid()) {
         SkipUntil(tok::r_square);
         return move(RHS);
@@ -309,7 +309,7 @@
 ///         designation[opt] initializer
 ///         initializer-list ',' designation[opt] initializer
 ///
-Parser::OwningExprResult Parser::ParseBraceInitializer() {
+ExprResult Parser::ParseBraceInitializer() {
   SourceLocation LBraceLoc = ConsumeBrace();
 
   /// InitExprs - This is the actual list of expressions contained in the
@@ -332,7 +332,7 @@
 
     // If we know that this cannot be a designation, just parse the nested
     // initializer directly.
-    OwningExprResult SubElt;
+    ExprResult SubElt;
     if (MayBeDesignationStart(Tok.getKind(), PP))
       SubElt = ParseInitializerWithPotentialDesignator();
     else

Modified: cfe/trunk/lib/Parse/ParseObjc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseObjc.cpp?rev=111903&r1=111902&r2=111903&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseObjc.cpp (original)
+++ cfe/trunk/lib/Parse/ParseObjc.cpp Tue Aug 24 01:29:42 2010
@@ -1463,8 +1463,8 @@
 ///  objc-throw-statement:
 ///    throw expression[opt];
 ///
-Parser::OwningStmtResult Parser::ParseObjCThrowStmt(SourceLocation atLoc) {
-  OwningExprResult Res;
+StmtResult Parser::ParseObjCThrowStmt(SourceLocation atLoc) {
+  ExprResult Res;
   ConsumeToken(); // consume throw
   if (Tok.isNot(tok::semi)) {
     Res = ParseExpression();
@@ -1481,7 +1481,7 @@
 /// objc-synchronized-statement:
 ///   @synchronized '(' expression ')' compound-statement
 ///
-Parser::OwningStmtResult
+StmtResult
 Parser::ParseObjCSynchronizedStmt(SourceLocation atLoc) {
   ConsumeToken(); // consume synchronized
   if (Tok.isNot(tok::l_paren)) {
@@ -1489,7 +1489,7 @@
     return StmtError();
   }
   ConsumeParen();  // '('
-  OwningExprResult Res(ParseExpression());
+  ExprResult Res(ParseExpression());
   if (Res.isInvalid()) {
     SkipUntil(tok::semi);
     return StmtError();
@@ -1507,7 +1507,7 @@
   // statements can always hold declarations.
   ParseScope BodyScope(this, Scope::DeclScope);
 
-  OwningStmtResult SynchBody(ParseCompoundStatementBody());
+  StmtResult SynchBody(ParseCompoundStatementBody());
 
   BodyScope.Exit();
   if (SynchBody.isInvalid())
@@ -1526,7 +1526,7 @@
 ///     parameter-declaration
 ///     '...' [OBJC2]
 ///
-Parser::OwningStmtResult Parser::ParseObjCTryStmt(SourceLocation atLoc) {
+StmtResult Parser::ParseObjCTryStmt(SourceLocation atLoc) {
   bool catch_or_finally_seen = false;
 
   ConsumeToken(); // consume try
@@ -1535,9 +1535,9 @@
     return StmtError();
   }
   StmtVector CatchStmts(Actions);
-  OwningStmtResult FinallyStmt;
+  StmtResult FinallyStmt;
   ParseScope TryScope(this, Scope::DeclScope);
-  OwningStmtResult TryBody(ParseCompoundStatementBody());
+  StmtResult TryBody(ParseCompoundStatementBody());
   TryScope.Exit();
   if (TryBody.isInvalid())
     TryBody = Actions.ActOnNullStmt(Tok.getLocation());
@@ -1580,7 +1580,7 @@
         else // Skip over garbage, until we get to ')'.  Eat the ')'.
           SkipUntil(tok::r_paren, true, false);
 
-        OwningStmtResult CatchBody(true);
+        StmtResult CatchBody(true);
         if (Tok.is(tok::l_brace))
           CatchBody = ParseCompoundStatementBody();
         else
@@ -1588,7 +1588,7 @@
         if (CatchBody.isInvalid())
           CatchBody = Actions.ActOnNullStmt(Tok.getLocation());
         
-        OwningStmtResult Catch = Actions.ActOnObjCAtCatchStmt(AtCatchFinallyLoc,
+        StmtResult Catch = Actions.ActOnObjCAtCatchStmt(AtCatchFinallyLoc,
                                                               RParenLoc, 
                                                               FirstPart, 
                                                               CatchBody.take());
@@ -1606,7 +1606,7 @@
       ConsumeToken(); // consume finally
       ParseScope FinallyScope(this, Scope::DeclScope);
 
-      OwningStmtResult FinallyBody(true);
+      StmtResult FinallyBody(true);
       if (Tok.is(tok::l_brace))
         FinallyBody = ParseCompoundStatementBody();
       else
@@ -1668,7 +1668,7 @@
   // specified Declarator for the method.
   Actions.ActOnStartOfObjCMethodDef(getCurScope(), MDecl);
 
-  OwningStmtResult FnBody(ParseCompoundStatementBody());
+  StmtResult FnBody(ParseCompoundStatementBody());
 
   // If the function body could not be parsed, make a bogus compoundstmt.
   if (FnBody.isInvalid())
@@ -1684,7 +1684,7 @@
   return MDecl;
 }
 
-Parser::OwningStmtResult Parser::ParseObjCAtStatement(SourceLocation AtLoc) {
+StmtResult Parser::ParseObjCAtStatement(SourceLocation AtLoc) {
   if (Tok.is(tok::code_completion)) {
     Actions.CodeCompleteObjCAtStatement(getCurScope());
     ConsumeCodeCompletionToken();
@@ -1700,7 +1700,7 @@
   if (Tok.isObjCAtKeyword(tok::objc_synchronized))
     return ParseObjCSynchronizedStmt(AtLoc);
   
-  OwningExprResult Res(ParseExpressionWithLeadingAt(AtLoc));
+  ExprResult Res(ParseExpressionWithLeadingAt(AtLoc));
   if (Res.isInvalid()) {
     // If the expression is invalid, skip ahead to the next semicolon. Not
     // doing this opens us up to the possibility of infinite loops if
@@ -1714,7 +1714,7 @@
   return Actions.ActOnExprStmt(Actions.MakeFullExpr(Res.take()));
 }
 
-Parser::OwningExprResult Parser::ParseObjCAtExpression(SourceLocation AtLoc) {
+ExprResult Parser::ParseObjCAtExpression(SourceLocation AtLoc) {
   switch (Tok.getKind()) {
   case tok::code_completion:
     Actions.CodeCompleteObjCAtExpression(getCurScope());
@@ -1771,7 +1771,7 @@
   if (!isCXXSimpleTypeSpecifier()) {
     //   objc-receiver:
     //     expression
-    OwningExprResult Receiver = ParseExpression();
+    ExprResult Receiver = ParseExpression();
     if (Receiver.isInvalid())
       return true;
 
@@ -1800,7 +1800,7 @@
     // postfix-expression suffix, followed by the (optional)
     // right-hand side of the binary expression. We have an
     // instance method.
-    OwningExprResult Receiver = ParseCXXTypeConstructExpression(DS);
+    ExprResult Receiver = ParseCXXTypeConstructExpression(DS);
     if (!Receiver.isInvalid())
       Receiver = ParsePostfixExpressionSuffix(Receiver.take());
     if (!Receiver.isInvalid())
@@ -1847,7 +1847,7 @@
 ///     class-name
 ///     type-name
 ///
-Parser::OwningExprResult Parser::ParseObjCMessageExpression() {
+ExprResult Parser::ParseObjCMessageExpression() {
   assert(Tok.is(tok::l_square) && "'[' expected");
   SourceLocation LBracLoc = ConsumeBracket(); // consume '['
 
@@ -1918,7 +1918,7 @@
   }
   
   // Otherwise, an arbitrary expression can be the receiver of a send.
-  OwningExprResult Res(ParseExpression());
+  ExprResult Res(ParseExpression());
   if (Res.isInvalid()) {
     SkipUntil(tok::r_square);
     return move(Res);
@@ -1966,7 +1966,7 @@
 ///     assignment-expression
 ///     nonempty-expr-list , assignment-expression
 ///
-Parser::OwningExprResult
+ExprResult
 Parser::ParseObjCMessageExpressionBody(SourceLocation LBracLoc,
                                        SourceLocation SuperLoc,
                                        ParsedType ReceiverType,
@@ -2007,7 +2007,7 @@
 
       ConsumeToken(); // Eat the ':'.
       ///  Parse the expression after ':'
-      OwningExprResult Res(ParseAssignmentExpression());
+      ExprResult Res(ParseAssignmentExpression());
       if (Res.isInvalid()) {
         // We must manually skip to a ']', otherwise the expression skipper will
         // stop at the ']' when it skips to the ';'.  We want it to skip beyond
@@ -2046,7 +2046,7 @@
     while (Tok.is(tok::comma)) {
       ConsumeToken(); // Eat the ','.
       ///  Parse the expression after ','
-      OwningExprResult Res(ParseAssignmentExpression());
+      ExprResult Res(ParseAssignmentExpression());
       if (Res.isInvalid()) {
         // We must manually skip to a ']', otherwise the expression skipper will
         // stop at the ']' when it skips to the ';'.  We want it to skip beyond
@@ -2106,8 +2106,8 @@
                                                            KeyExprs.size()));
 }
 
-Parser::OwningExprResult Parser::ParseObjCStringLiteral(SourceLocation AtLoc) {
-  OwningExprResult Res(ParseStringLiteralExpression());
+ExprResult Parser::ParseObjCStringLiteral(SourceLocation AtLoc) {
+  ExprResult Res(ParseStringLiteralExpression());
   if (Res.isInvalid()) return move(Res);
 
   // @"foo" @"bar" is a valid concatenated string.  Eat any subsequent string
@@ -2125,7 +2125,7 @@
     if (!isTokenStringLiteral())
       return ExprError(Diag(Tok, diag::err_objc_concat_string));
 
-    OwningExprResult Lit(ParseStringLiteralExpression());
+    ExprResult Lit(ParseStringLiteralExpression());
     if (Lit.isInvalid())
       return move(Lit);
 
@@ -2138,7 +2138,7 @@
 
 ///    objc-encode-expression:
 ///      @encode ( type-name )
-Parser::OwningExprResult
+ExprResult
 Parser::ParseObjCEncodeExpression(SourceLocation AtLoc) {
   assert(Tok.isObjCAtKeyword(tok::objc_encode) && "Not an @encode expression!");
 
@@ -2162,7 +2162,7 @@
 
 ///     objc-protocol-expression
 ///       @protocol ( protocol-name )
-Parser::OwningExprResult
+ExprResult
 Parser::ParseObjCProtocolExpression(SourceLocation AtLoc) {
   SourceLocation ProtoLoc = ConsumeToken();
 
@@ -2185,8 +2185,7 @@
 
 ///     objc-selector-expression
 ///       @selector '(' objc-keyword-selector ')'
-Parser::OwningExprResult
-Parser::ParseObjCSelectorExpression(SourceLocation AtLoc) {
+ExprResult Parser::ParseObjCSelectorExpression(SourceLocation AtLoc) {
   SourceLocation SelectorLoc = ConsumeToken();
 
   if (Tok.isNot(tok::l_paren))

Modified: cfe/trunk/lib/Parse/ParsePragma.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParsePragma.cpp?rev=111903&r1=111902&r2=111903&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParsePragma.cpp (original)
+++ cfe/trunk/lib/Parse/ParsePragma.cpp Tue Aug 24 01:29:42 2010
@@ -87,7 +87,7 @@
 
   Action::PragmaPackKind Kind = Action::PPK_Default;
   IdentifierInfo *Name = 0;
-  Action::OwningExprResult Alignment;
+  ExprResult Alignment;
   SourceLocation LParenLoc = Tok.getLocation();
   PP.Lex(Tok);
   if (Tok.is(tok::numeric_constant)) {

Modified: cfe/trunk/lib/Parse/ParseStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseStmt.cpp?rev=111903&r1=111902&r2=111903&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseStmt.cpp (original)
+++ cfe/trunk/lib/Parse/ParseStmt.cpp Tue Aug 24 01:29:42 2010
@@ -73,10 +73,10 @@
 /// [OBC]   '@' 'throw' expression ';'
 /// [OBC]   '@' 'throw' ';'
 ///
-Parser::OwningStmtResult
+StmtResult
 Parser::ParseStatementOrDeclaration(bool OnlyStatement) {
   const char *SemiError = 0;
-  OwningStmtResult Res;
+  StmtResult Res;
   
   ParenBraceBracketBalancer BalancerRAIIObj(*this);
 
@@ -125,7 +125,7 @@
 
     // FIXME: Use the attributes
     // expression[opt] ';'
-    OwningExprResult Expr(ParseExpression());
+    ExprResult Expr(ParseExpression());
     if (Expr.isInvalid()) {
       // If the expression is invalid, skip ahead to the next semicolon or '}'.
       // Not doing this opens us up to the possibility of infinite loops if
@@ -217,7 +217,7 @@
 ///         identifier ':' statement
 /// [GNU]   identifier ':' attributes[opt] statement
 ///
-Parser::OwningStmtResult Parser::ParseLabeledStatement(AttributeList *Attr) {
+StmtResult Parser::ParseLabeledStatement(AttributeList *Attr) {
   assert(Tok.is(tok::identifier) && Tok.getIdentifierInfo() &&
          "Not an identifier!");
 
@@ -234,7 +234,7 @@
   if (Tok.is(tok::kw___attribute))
     AttrList.reset(addAttributeLists(AttrList.take(), ParseGNUAttributes()));
 
-  OwningStmtResult SubStmt(ParseStatement());
+  StmtResult SubStmt(ParseStatement());
 
   // Broken substmt shouldn't prevent the label from being added to the AST.
   if (SubStmt.isInvalid())
@@ -251,7 +251,7 @@
 ///         'case' constant-expression ':' statement
 /// [GNU]   'case' constant-expression '...' constant-expression ':' statement
 ///
-Parser::OwningStmtResult Parser::ParseCaseStatement(AttributeList *Attr) {
+StmtResult Parser::ParseCaseStatement(AttributeList *Attr) {
   assert(Tok.is(tok::kw_case) && "Not a case stmt!");
   // FIXME: Use attributes?
   delete Attr;
@@ -272,7 +272,7 @@
 
   // TopLevelCase - This is the highest level we have parsed.  'case 1' in the
   // example above.
-  OwningStmtResult TopLevelCase(true);
+  StmtResult TopLevelCase(true);
 
   // DeepestParsedCaseStmt - This is the deepest statement we have parsed, which
   // gets updated each time a new case is parsed, and whose body is unset so
@@ -293,7 +293,7 @@
     /// expression.
     ColonProtectionRAIIObject ColonProtection(*this);
     
-    OwningExprResult LHS(ParseConstantExpression());
+    ExprResult LHS(ParseConstantExpression());
     if (LHS.isInvalid()) {
       SkipUntil(tok::colon);
       return StmtError();
@@ -301,7 +301,7 @@
 
     // GNU case range extension.
     SourceLocation DotDotDotLoc;
-    OwningExprResult RHS;
+    ExprResult RHS;
     if (Tok.is(tok::ellipsis)) {
       Diag(Tok, diag::ext_gnu_case_range);
       DotDotDotLoc = ConsumeToken();
@@ -323,7 +323,7 @@
 
     SourceLocation ColonLoc = ConsumeToken();
 
-    OwningStmtResult Case =
+    StmtResult Case =
       Actions.ActOnCaseStmt(CaseLoc, LHS.get(), DotDotDotLoc,
                             RHS.get(), ColonLoc);
 
@@ -350,7 +350,7 @@
   assert(!TopLevelCase.isInvalid() && "Should have parsed at least one case!");
 
   // If we found a non-case statement, start by parsing it.
-  OwningStmtResult SubStmt;
+  StmtResult SubStmt;
 
   if (Tok.isNot(tok::r_brace)) {
     SubStmt = ParseStatement();
@@ -378,7 +378,7 @@
 ///         'default' ':' statement
 /// Note that this does not parse the 'statement' at the end.
 ///
-Parser::OwningStmtResult Parser::ParseDefaultStatement(AttributeList *Attr) {
+StmtResult Parser::ParseDefaultStatement(AttributeList *Attr) {
   //FIXME: Use attributes?
   delete Attr;
 
@@ -399,7 +399,7 @@
     return StmtError();
   }
 
-  OwningStmtResult SubStmt(ParseStatement());
+  StmtResult SubStmt(ParseStatement());
   if (SubStmt.isInvalid())
     return StmtError();
 
@@ -435,7 +435,7 @@
 /// [OMP]   barrier-directive
 /// [OMP]   flush-directive
 ///
-Parser::OwningStmtResult Parser::ParseCompoundStatement(AttributeList *Attr,
+StmtResult Parser::ParseCompoundStatement(AttributeList *Attr,
                                                         bool isStmtExpr) {
   //FIXME: Use attributes?
   delete Attr;
@@ -455,7 +455,7 @@
 /// ActOnCompoundStmt action.  This expects the '{' to be the current token, and
 /// consume the '}' at the end of the block.  It does not manipulate the scope
 /// stack.
-Parser::OwningStmtResult Parser::ParseCompoundStatementBody(bool isStmtExpr) {
+StmtResult Parser::ParseCompoundStatementBody(bool isStmtExpr) {
   PrettyStackTraceLoc CrashInfo(PP.getSourceManager(),
                                 Tok.getLocation(),
                                 "in compound statement ('{}')");
@@ -468,7 +468,7 @@
   typedef StmtVector StmtsTy;
   StmtsTy Stmts(Actions);
   while (Tok.isNot(tok::r_brace) && Tok.isNot(tok::eof)) {
-    OwningStmtResult R;
+    StmtResult R;
     if (Tok.isNot(tok::kw___extension__)) {
       R = ParseStatementOrDeclaration(false);
     } else {
@@ -496,7 +496,7 @@
         R = Actions.ActOnDeclStmt(Res, DeclStart, DeclEnd);
       } else {
         // Otherwise this was a unary __extension__ marker.
-        OwningExprResult Res(ParseExpressionWithLeadingExtension(ExtLoc));
+        ExprResult Res(ParseExpressionWithLeadingExtension(ExtLoc));
 
         if (Res.isInvalid()) {
           SkipUntil(tok::semi);
@@ -537,7 +537,7 @@
 /// should try to recover harder.  It returns false if the condition is
 /// successfully parsed.  Note that a successful parse can still have semantic
 /// errors in the condition.
-bool Parser::ParseParenExprOrCondition(OwningExprResult &ExprResult,
+bool Parser::ParseParenExprOrCondition(ExprResult &ExprResult,
                                        Decl *&DeclResult,
                                        SourceLocation Loc,
                                        bool ConvertToBoolean) {
@@ -581,7 +581,7 @@
 /// [C++]   'if' '(' condition ')' statement
 /// [C++]   'if' '(' condition ')' statement 'else' statement
 ///
-Parser::OwningStmtResult Parser::ParseIfStatement(AttributeList *Attr) {
+StmtResult Parser::ParseIfStatement(AttributeList *Attr) {
   // FIXME: Use attributes?
   delete Attr;
 
@@ -611,7 +611,7 @@
   ParseScope IfScope(this, Scope::DeclScope | Scope::ControlScope, C99orCXX);
 
   // Parse the condition.
-  OwningExprResult CondExp;
+  ExprResult CondExp;
   Decl *CondVar = 0;
   if (ParseParenExprOrCondition(CondExp, CondVar, IfLoc, true))
     return StmtError();
@@ -641,7 +641,7 @@
 
   // Read the 'then' stmt.
   SourceLocation ThenStmtLoc = Tok.getLocation();
-  OwningStmtResult ThenStmt(ParseStatement());
+  StmtResult ThenStmt(ParseStatement());
 
   // Pop the 'if' scope if needed.
   InnerScope.Exit();
@@ -649,7 +649,7 @@
   // If it has an else, parse it.
   SourceLocation ElseLoc;
   SourceLocation ElseStmtLoc;
-  OwningStmtResult ElseStmt;
+  StmtResult ElseStmt;
 
   if (Tok.is(tok::kw_else)) {
     ElseLoc = ConsumeToken();
@@ -704,7 +704,7 @@
 ///       switch-statement:
 ///         'switch' '(' expression ')' statement
 /// [C++]   'switch' '(' condition ')' statement
-Parser::OwningStmtResult Parser::ParseSwitchStatement(AttributeList *Attr) {
+StmtResult Parser::ParseSwitchStatement(AttributeList *Attr) {
   // FIXME: Use attributes?
   delete Attr;
 
@@ -737,12 +737,12 @@
   ParseScope SwitchScope(this, ScopeFlags);
 
   // Parse the condition.
-  OwningExprResult Cond;
+  ExprResult Cond;
   Decl *CondVar = 0;
   if (ParseParenExprOrCondition(Cond, CondVar, SwitchLoc, false))
     return StmtError();
 
-  OwningStmtResult Switch
+  StmtResult Switch
     = Actions.ActOnStartOfSwitchStmt(SwitchLoc, Cond.get(), CondVar);
 
   if (Switch.isInvalid()) {
@@ -773,7 +773,7 @@
                         C99orCXX && Tok.isNot(tok::l_brace));
 
   // Read the body statement.
-  OwningStmtResult Body(ParseStatement());
+  StmtResult Body(ParseStatement());
 
   // Pop the scopes.
   InnerScope.Exit();
@@ -790,7 +790,7 @@
 ///       while-statement: [C99 6.8.5.1]
 ///         'while' '(' expression ')' statement
 /// [C++]   'while' '(' condition ')' statement
-Parser::OwningStmtResult Parser::ParseWhileStatement(AttributeList *Attr) {
+StmtResult Parser::ParseWhileStatement(AttributeList *Attr) {
   // FIXME: Use attributes?
   delete Attr;
 
@@ -827,7 +827,7 @@
   ParseScope WhileScope(this, ScopeFlags);
 
   // Parse the condition.
-  OwningExprResult Cond;
+  ExprResult Cond;
   Decl *CondVar = 0;
   if (ParseParenExprOrCondition(Cond, CondVar, WhileLoc, true))
     return StmtError();
@@ -849,7 +849,7 @@
                         C99orCXX && Tok.isNot(tok::l_brace));
 
   // Read the body statement.
-  OwningStmtResult Body(ParseStatement());
+  StmtResult Body(ParseStatement());
 
   // Pop the body scope if needed.
   InnerScope.Exit();
@@ -865,7 +865,7 @@
 ///       do-statement: [C99 6.8.5.2]
 ///         'do' statement 'while' '(' expression ')' ';'
 /// Note: this lets the caller parse the end ';'.
-Parser::OwningStmtResult Parser::ParseDoStatement(AttributeList *Attr) {
+StmtResult Parser::ParseDoStatement(AttributeList *Attr) {
   // FIXME: Use attributes?
   delete Attr;
 
@@ -895,7 +895,7 @@
                         Tok.isNot(tok::l_brace));
 
   // Read the body statement.
-  OwningStmtResult Body(ParseStatement());
+  StmtResult Body(ParseStatement());
 
   // Pop the body scope if needed.
   InnerScope.Exit();
@@ -918,7 +918,7 @@
 
   // Parse the parenthesized condition.
   SourceLocation LPLoc = ConsumeParen();
-  OwningExprResult Cond = ParseExpression();
+  ExprResult Cond = ParseExpression();
   SourceLocation RPLoc = MatchRHSPunctuation(tok::r_paren, LPLoc);
   DoScope.Exit();
 
@@ -942,7 +942,7 @@
 /// [C++]   expression-statement
 /// [C++]   simple-declaration
 ///
-Parser::OwningStmtResult Parser::ParseForStatement(AttributeList *Attr) {
+StmtResult Parser::ParseForStatement(AttributeList *Attr) {
   // FIXME: Use attributes?
   delete Attr;
 
@@ -982,13 +982,13 @@
   ParseScope ForScope(this, ScopeFlags);
 
   SourceLocation LParenLoc = ConsumeParen();
-  OwningExprResult Value;
+  ExprResult Value;
 
   bool ForEach = false;
-  OwningStmtResult FirstPart;
+  StmtResult FirstPart;
   bool SecondPartIsInvalid = false;
   FullExprArg SecondPart(Actions);
-  OwningExprResult Collection;
+  ExprResult Collection;
   FullExprArg ThirdPart(Actions);
   Decl *SecondVar = 0;
   
@@ -1061,7 +1061,7 @@
     if (Tok.is(tok::semi)) {  // for (...;;
       // no second part.
     } else {
-      OwningExprResult Second;
+      ExprResult Second;
       if (getLang().CPlusPlus)
         ParseCXXCondition(Second, SecondVar, ForLoc, true);
       else {
@@ -1084,7 +1084,7 @@
 
     // Parse the third part of the for specifier.
     if (Tok.isNot(tok::r_paren)) {   // for (...;...;)
-      OwningExprResult Third = ParseExpression();
+      ExprResult Third = ParseExpression();
       ThirdPart = Actions.MakeFullExpr(Third.take());
     }
   }
@@ -1106,7 +1106,7 @@
                         C99orCXXorObjC && Tok.isNot(tok::l_brace));
 
   // Read the body statement.
-  OwningStmtResult Body(ParseStatement());
+  StmtResult Body(ParseStatement());
 
   // Pop the body scope if needed.
   InnerScope.Exit();
@@ -1135,14 +1135,14 @@
 ///
 /// Note: this lets the caller parse the end ';'.
 ///
-Parser::OwningStmtResult Parser::ParseGotoStatement(AttributeList *Attr) {
+StmtResult Parser::ParseGotoStatement(AttributeList *Attr) {
   // FIXME: Use attributes?
   delete Attr;
 
   assert(Tok.is(tok::kw_goto) && "Not a goto stmt!");
   SourceLocation GotoLoc = ConsumeToken();  // eat the 'goto'.
 
-  OwningStmtResult Res;
+  StmtResult Res;
   if (Tok.is(tok::identifier)) {
     Res = Actions.ActOnGotoStmt(GotoLoc, Tok.getLocation(),
                                 Tok.getIdentifierInfo());
@@ -1151,7 +1151,7 @@
     // GNU indirect goto extension.
     Diag(Tok, diag::ext_gnu_indirect_goto);
     SourceLocation StarLoc = ConsumeToken();
-    OwningExprResult R(ParseExpression());
+    ExprResult R(ParseExpression());
     if (R.isInvalid()) {  // Skip to the semicolon, but don't consume it.
       SkipUntil(tok::semi, false, true);
       return StmtError();
@@ -1171,7 +1171,7 @@
 ///
 /// Note: this lets the caller parse the end ';'.
 ///
-Parser::OwningStmtResult Parser::ParseContinueStatement(AttributeList *Attr) {
+StmtResult Parser::ParseContinueStatement(AttributeList *Attr) {
   // FIXME: Use attributes?
   delete Attr;
 
@@ -1185,7 +1185,7 @@
 ///
 /// Note: this lets the caller parse the end ';'.
 ///
-Parser::OwningStmtResult Parser::ParseBreakStatement(AttributeList *Attr) {
+StmtResult Parser::ParseBreakStatement(AttributeList *Attr) {
   // FIXME: Use attributes?
   delete Attr;
 
@@ -1196,14 +1196,14 @@
 /// ParseReturnStatement
 ///       jump-statement:
 ///         'return' expression[opt] ';'
-Parser::OwningStmtResult Parser::ParseReturnStatement(AttributeList *Attr) {
+StmtResult Parser::ParseReturnStatement(AttributeList *Attr) {
   // FIXME: Use attributes?
   delete Attr;
 
   assert(Tok.is(tok::kw_return) && "Not a return stmt!");
   SourceLocation ReturnLoc = ConsumeToken();  // eat the 'return'.
 
-  OwningExprResult R;
+  ExprResult R;
   if (Tok.isNot(tok::semi)) {
     if (Tok.is(tok::code_completion)) {
       Actions.CodeCompleteReturn(getCurScope());
@@ -1223,7 +1223,7 @@
 
 /// FuzzyParseMicrosoftAsmStatement. When -fms-extensions is enabled, this
 /// routine is called to skip/ignore tokens that comprise the MS asm statement.
-Parser::OwningStmtResult Parser::FuzzyParseMicrosoftAsmStatement() {
+StmtResult Parser::FuzzyParseMicrosoftAsmStatement() {
   if (Tok.is(tok::l_brace)) {
     unsigned short savedBraceCount = BraceCount;
     do {
@@ -1247,7 +1247,7 @@
   t.setLiteralData("\"/*FIXME: not done*/\"");
   t.clearFlag(Token::NeedsCleaning);
   t.setLength(21);
-  OwningExprResult AsmString(Actions.ActOnStringLiteral(&t, 1));
+  ExprResult AsmString(Actions.ActOnStringLiteral(&t, 1));
   ExprVector Constraints(Actions);
   ExprVector Exprs(Actions);
   ExprVector Clobbers(Actions);
@@ -1284,7 +1284,7 @@
 ///         assembly-instruction ';'[opt]
 ///         assembly-instruction-list ';' assembly-instruction ';'[opt]
 ///
-Parser::OwningStmtResult Parser::ParseAsmStatement(bool &msAsm) {
+StmtResult Parser::ParseAsmStatement(bool &msAsm) {
   assert(Tok.is(tok::kw_asm) && "Not an asm stmt");
   SourceLocation AsmLoc = ConsumeToken();
 
@@ -1311,7 +1311,7 @@
   }
   Loc = ConsumeParen();
 
-  OwningExprResult AsmString(ParseAsmStringLiteral());
+  ExprResult AsmString(ParseAsmStringLiteral());
   if (AsmString.isInvalid())
     return StmtError();
 
@@ -1374,7 +1374,7 @@
     // Parse the asm-string list for clobbers if present.
     if (Tok.isNot(tok::r_paren)) {
       while (1) {
-        OwningExprResult Clobber(ParseAsmStringLiteral());
+        ExprResult Clobber(ParseAsmStringLiteral());
 
         if (Clobber.isInvalid())
           break;
@@ -1434,7 +1434,7 @@
     } else
       Names.push_back(0);
 
-    OwningExprResult Constraint(ParseAsmStringLiteral());
+    ExprResult Constraint(ParseAsmStringLiteral());
     if (Constraint.isInvalid()) {
         SkipUntil(tok::r_paren);
         return true;
@@ -1449,7 +1449,7 @@
 
     // Read the parenthesized expression.
     SourceLocation OpenLoc = ConsumeParen();
-    OwningExprResult Res(ParseExpression());
+    ExprResult Res(ParseExpression());
     MatchRHSPunctuation(tok::r_paren, OpenLoc);
     if (Res.isInvalid()) {
       SkipUntil(tok::r_paren);
@@ -1475,7 +1475,7 @@
   // Do not enter a scope for the brace, as the arguments are in the same scope
   // (the function body) as the body itself.  Instead, just read the statement
   // list and put it into a CompoundStmt for safe keeping.
-  OwningStmtResult FnBody(ParseCompoundStatementBody());
+  StmtResult FnBody(ParseCompoundStatementBody());
 
   // If the function body could not be parsed, make a bogus compoundstmt.
   if (FnBody.isInvalid())
@@ -1503,7 +1503,7 @@
     ParseConstructorInitializer(Decl);
 
   SourceLocation LBraceLoc = Tok.getLocation();
-  OwningStmtResult FnBody(ParseCXXTryBlockCommon(TryLoc));
+  StmtResult FnBody(ParseCXXTryBlockCommon(TryLoc));
   // If we failed to parse the try-catch, we just give the function an empty
   // compound statement as the body.
   if (FnBody.isInvalid())
@@ -1518,7 +1518,7 @@
 ///       try-block:
 ///         'try' compound-statement handler-seq
 ///
-Parser::OwningStmtResult Parser::ParseCXXTryBlock(AttributeList* Attr) {
+StmtResult Parser::ParseCXXTryBlock(AttributeList* Attr) {
   // FIXME: Add attributes?
   delete Attr;
 
@@ -1540,11 +1540,11 @@
 ///       handler-seq:
 ///         handler handler-seq[opt]
 ///
-Parser::OwningStmtResult Parser::ParseCXXTryBlockCommon(SourceLocation TryLoc) {
+StmtResult Parser::ParseCXXTryBlockCommon(SourceLocation TryLoc) {
   if (Tok.isNot(tok::l_brace))
     return StmtError(Diag(Tok, diag::err_expected_lbrace));
   // FIXME: Possible draft standard bug: attribute-specifier should be allowed?
-  OwningStmtResult TryBlock(ParseCompoundStatement(0));
+  StmtResult TryBlock(ParseCompoundStatement(0));
   if (TryBlock.isInvalid())
     return move(TryBlock);
 
@@ -1557,7 +1557,7 @@
   if (Tok.isNot(tok::kw_catch))
     return StmtError(Diag(Tok, diag::err_expected_catch));
   while (Tok.is(tok::kw_catch)) {
-    OwningStmtResult Handler(ParseCXXCatchBlock());
+    StmtResult Handler(ParseCXXCatchBlock());
     if (!Handler.isInvalid())
       Handlers.push_back(Handler.release());
   }
@@ -1580,7 +1580,7 @@
 ///         type-specifier-seq
 ///         '...'
 ///
-Parser::OwningStmtResult Parser::ParseCXXCatchBlock() {
+StmtResult Parser::ParseCXXCatchBlock() {
   assert(Tok.is(tok::kw_catch) && "Expected 'catch'");
 
   SourceLocation CatchLoc = ConsumeToken();
@@ -1614,7 +1614,7 @@
     return StmtError(Diag(Tok, diag::err_expected_lbrace));
 
   // FIXME: Possible draft standard bug: attribute-specifier should be allowed?
-  OwningStmtResult Block(ParseCompoundStatement(0));
+  StmtResult Block(ParseCompoundStatement(0));
   if (Block.isInvalid())
     return move(Block);
 

Modified: cfe/trunk/lib/Parse/ParseTemplate.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseTemplate.cpp?rev=111903&r1=111902&r2=111903&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseTemplate.cpp (original)
+++ cfe/trunk/lib/Parse/ParseTemplate.cpp Tue Aug 24 01:29:42 2010
@@ -601,7 +601,7 @@
   // Per C++0x [basic.scope.pdecl]p9, we parse the default argument before
   // we introduce the template parameter into the local scope.
   SourceLocation EqualLoc;
-  OwningExprResult DefaultArg;
+  ExprResult DefaultArg;
   if (Tok.is(tok::equal)) {
     EqualLoc = ConsumeToken();
 
@@ -988,7 +988,7 @@
   
   // Parse a non-type template argument. 
   SourceLocation Loc = Tok.getLocation();
-  OwningExprResult ExprArg = ParseConstantExpression();
+  ExprResult ExprArg = ParseConstantExpression();
   if (ExprArg.isInvalid() || !ExprArg.get())
     return ParsedTemplateArgument();
 

Modified: cfe/trunk/lib/Parse/Parser.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/Parser.cpp?rev=111903&r1=111902&r2=111903&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/Parser.cpp (original)
+++ cfe/trunk/lib/Parse/Parser.cpp Tue Aug 24 01:29:42 2010
@@ -436,7 +436,7 @@
       Diag(Attr.Range.getBegin(), diag::err_attributes_not_allowed)
         << Attr.Range;
 
-    OwningExprResult Result(ParseSimpleAsm());
+    ExprResult Result(ParseSimpleAsm());
 
     ExpectAndConsume(tok::semi, diag::err_expected_semi_after,
                      "top-level asm block");
@@ -829,13 +829,13 @@
 /// [GNU] asm-string-literal:
 ///         string-literal
 ///
-Parser::OwningExprResult Parser::ParseAsmStringLiteral() {
+Parser::ExprResult Parser::ParseAsmStringLiteral() {
   if (!isTokenStringLiteral()) {
     Diag(Tok, diag::err_expected_string_literal);
     return ExprError();
   }
 
-  OwningExprResult Res(ParseStringLiteralExpression());
+  ExprResult Res(ParseStringLiteralExpression());
   if (Res.isInvalid()) return move(Res);
 
   // TODO: Diagnose: wide string literal in 'asm'
@@ -848,7 +848,7 @@
 /// [GNU] simple-asm-expr:
 ///         'asm' '(' asm-string-literal ')'
 ///
-Parser::OwningExprResult Parser::ParseSimpleAsm(SourceLocation *EndLoc) {
+Parser::ExprResult Parser::ParseSimpleAsm(SourceLocation *EndLoc) {
   assert(Tok.is(tok::kw_asm) && "Not an asm!");
   SourceLocation Loc = ConsumeToken();
 
@@ -869,7 +869,7 @@
 
   Loc = ConsumeParen();
 
-  OwningExprResult Result(ParseAsmStringLiteral());
+  ExprResult Result(ParseAsmStringLiteral());
 
   if (Result.isInvalid()) {
     SkipUntil(tok::r_paren, true, true);

Modified: cfe/trunk/lib/Sema/SemaCXXCast.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaCXXCast.cpp?rev=111903&r1=111902&r2=111903&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaCXXCast.cpp (original)
+++ cfe/trunk/lib/Sema/SemaCXXCast.cpp Tue Aug 24 01:29:42 2010
@@ -116,7 +116,7 @@
                                         CastExpr::CastKind &Kind);
 
 /// ActOnCXXNamedCast - Parse {dynamic,static,reinterpret,const}_cast's.
-Action::OwningExprResult
+ExprResult
 Sema::ActOnCXXNamedCast(SourceLocation OpLoc, tok::TokenKind Kind,
                         SourceLocation LAngleBracketLoc, ParsedType Ty,
                         SourceLocation RAngleBracketLoc,
@@ -133,7 +133,7 @@
                            SourceRange(LParenLoc, RParenLoc));
 }
 
-Action::OwningExprResult
+ExprResult
 Sema::BuildCXXNamedCast(SourceLocation OpLoc, tok::TokenKind Kind,
                         TypeSourceInfo *DestTInfo, ExprArg Ex,
                         SourceRange AngleBrackets, SourceRange Parens) {
@@ -964,7 +964,7 @@
       (CStyle || !DestType->isReferenceType()))
     return TC_NotApplicable;
     
-  Sema::OwningExprResult Result
+  ExprResult Result
     = InitSeq.Perform(Self, Entity, InitKind,
                       Action::MultiExprArg(Self, &SrcExpr, 1));
   if (Result.isInvalid()) {

Modified: cfe/trunk/lib/Sema/SemaChecking.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaChecking.cpp?rev=111903&r1=111902&r2=111903&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaChecking.cpp (original)
+++ cfe/trunk/lib/Sema/SemaChecking.cpp Tue Aug 24 01:29:42 2010
@@ -121,9 +121,9 @@
   return false;
 }
 
-Action::OwningExprResult
+ExprResult
 Sema::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {
-  OwningExprResult TheCallResult(Owned(TheCall));
+  ExprResult TheCallResult(Owned(TheCall));
 
   switch (BuiltinID) {
   case Builtin::BI__builtin___CFStringMakeConstantString:
@@ -390,8 +390,8 @@
 ///
 /// This function goes through and does final semantic checking for these
 /// builtins,
-Sema::OwningExprResult
-Sema::SemaBuiltinAtomicOverloaded(OwningExprResult TheCallResult) {
+ExprResult
+Sema::SemaBuiltinAtomicOverloaded(ExprResult TheCallResult) {
   CallExpr *TheCall = (CallExpr *)TheCallResult.get();
   DeclRefExpr *DRE =cast<DeclRefExpr>(TheCall->getCallee()->IgnoreParenCasts());
   FunctionDecl *FDecl = cast<FunctionDecl>(DRE->getDecl());
@@ -746,7 +746,7 @@
 
 /// SemaBuiltinShuffleVector - Handle __builtin_shufflevector.
 // This is declared to take (...), so we have to check everything.
-Action::OwningExprResult Sema::SemaBuiltinShuffleVector(CallExpr *TheCall) {
+ExprResult Sema::SemaBuiltinShuffleVector(CallExpr *TheCall) {
   if (TheCall->getNumArgs() < 2)
     return ExprError(Diag(TheCall->getLocEnd(),
                           diag::err_typecheck_call_too_few_args_at_least)

Modified: cfe/trunk/lib/Sema/SemaCodeComplete.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaCodeComplete.cpp?rev=111903&r1=111902&r2=111903&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaCodeComplete.cpp (original)
+++ cfe/trunk/lib/Sema/SemaCodeComplete.cpp Tue Aug 24 01:29:42 2010
@@ -3707,7 +3707,7 @@
       // an instance method.
       QualType SuperTy = Context.getObjCInterfaceType(CDecl);
       SuperTy = Context.getObjCObjectPointerType(SuperTy);
-      OwningExprResult Super
+      ExprResult Super
         = Owned(new (Context) ObjCSuperExpr(SuperLoc, SuperTy));
       return CodeCompleteObjCInstanceMessage(S, (Expr *)Super.get(),
                                              SelIdents, NumSelIdents);
@@ -3733,7 +3733,7 @@
       CXXScopeSpec SS;
       UnqualifiedId id;
       id.setIdentifier(Super, SuperLoc);
-      OwningExprResult SuperExpr = ActOnIdExpression(S, SS, id, false, false);
+      ExprResult SuperExpr = ActOnIdExpression(S, SS, id, false, false);
       return CodeCompleteObjCInstanceMessage(S, (Expr *)SuperExpr.get(),
                                              SelIdents, NumSelIdents);
     }

Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=111903&r1=111902&r2=111903&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Tue Aug 24 01:29:42 2010
@@ -2147,7 +2147,7 @@
 
   case DeclSpec::TST_typeofExpr: {
     Expr *E = DS.getRepAsExpr();
-    OwningExprResult Result = S.RebuildExprInCurrentInstantiation(E);
+    ExprResult Result = S.RebuildExprInCurrentInstantiation(E);
     if (Result.isInvalid()) return true;
     DS.UpdateExprRep(Result.get());
     break;
@@ -4156,7 +4156,7 @@
       VDecl->setInvalidDecl();
     } else if (!VDecl->isInvalidDecl()) {
       InitializationSequence InitSeq(*this, Entity, Kind, &Init, 1);
-      OwningExprResult Result = InitSeq.Perform(*this, Entity, Kind,
+      ExprResult Result = InitSeq.Perform(*this, Entity, Kind,
                                                 MultiExprArg(*this, &Init, 1),
                                                 &DclT);
       if (Result.isInvalid()) {
@@ -4227,7 +4227,7 @@
       Diag(VDecl->getLocation(), diag::warn_extern_init);
     if (!VDecl->isInvalidDecl()) {
       InitializationSequence InitSeq(*this, Entity, Kind, &Init, 1);
-      OwningExprResult Result = InitSeq.Perform(*this, Entity, Kind,
+      ExprResult Result = InitSeq.Perform(*this, Entity, Kind,
                                                 MultiExprArg(*this, &Init, 1),
                                                 &DclT);
       if (Result.isInvalid()) {
@@ -4465,8 +4465,8 @@
         = InitializationKind::CreateDefault(Var->getLocation());
     
       InitializationSequence InitSeq(*this, Entity, Kind, 0, 0);
-      OwningExprResult Init = InitSeq.Perform(*this, Entity, Kind,
-                                              MultiExprArg(*this, 0, 0));
+      ExprResult Init = InitSeq.Perform(*this, Entity, Kind,
+                                        MultiExprArg(*this, 0, 0));
       if (Init.isInvalid())
         Var->setInvalidDecl();
       else if (Init.get()) {

Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=111903&r1=111902&r2=111903&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Tue Aug 24 01:29:42 2010
@@ -126,7 +126,7 @@
   InitializationKind Kind = InitializationKind::CreateCopy(Param->getLocation(),
                                                            EqualLoc);
   InitializationSequence InitSeq(*this, Entity, Kind, &Arg, 1);
-  OwningExprResult Result = InitSeq.Perform(*this, Entity, Kind,
+  ExprResult Result = InitSeq.Perform(*this, Entity, Kind,
                                             MultiExprArg(*this, &Arg, 1));
   if (Result.isInvalid())
     return true;
@@ -1317,7 +1317,7 @@
   
   InitializationSequence InitSeq(*this, MemberEntity, Kind, Args, NumArgs);
   
-  OwningExprResult MemberInit =
+  ExprResult MemberInit =
     InitSeq.Perform(*this, MemberEntity, Kind, 
                     MultiExprArg(*this, Args, NumArgs), 0);
   if (MemberInit.isInvalid())
@@ -1409,7 +1409,7 @@
   if (Dependent) {
     // Can't check initialization for a base of dependent type or when
     // any of the arguments are type-dependent expressions.
-    OwningExprResult BaseInit
+    ExprResult BaseInit
       = Owned(new (Context) ParenListExpr(Context, LParenLoc, Args, NumArgs,
                                           RParenLoc));
 
@@ -1448,7 +1448,7 @@
   
   InitializationSequence InitSeq(*this, BaseEntity, Kind, Args, NumArgs);
   
-  OwningExprResult BaseInit =
+  ExprResult BaseInit =
     InitSeq.Perform(*this, BaseEntity, Kind, 
                     MultiExprArg(*this, Args, NumArgs), 0);
   if (BaseInit.isInvalid())
@@ -1473,7 +1473,7 @@
     for (unsigned I = 0; I != NumArgs; ++I)
       Args[I]->Retain();
 
-    OwningExprResult Init
+    ExprResult Init
       = Owned(new (Context) ParenListExpr(Context, LParenLoc, Args, NumArgs,
                                           RParenLoc));
     return new (Context) CXXBaseOrMemberInitializer(Context, BaseTInfo,
@@ -1508,7 +1508,7 @@
     = InitializedEntity::InitializeBase(SemaRef.Context, BaseSpec,
                                         IsInheritedVirtualBase);
 
-  Sema::OwningExprResult BaseInit;
+  ExprResult BaseInit;
   
   switch (ImplicitInitKind) {
   case IIK_Default: {
@@ -1597,7 +1597,7 @@
                               Sema::LookupMemberName);
     MemberLookup.addDecl(Field, AS_public);
     MemberLookup.resolveKind();
-    Sema::OwningExprResult CopyCtorArg 
+    ExprResult CopyCtorArg 
       = SemaRef.BuildMemberReferenceExpr(MemberExprBase,
                                          ParamType, Loc,
                                          /*IsArrow=*/false,
@@ -1633,7 +1633,7 @@
       IndexVariables.push_back(IterationVar);
       
       // Create a reference to the iteration variable.
-      Sema::OwningExprResult IterationVarRef
+      ExprResult IterationVarRef
         = SemaRef.BuildDeclRefExpr(IterationVar, SizeType, Loc);
       assert(!IterationVarRef.isInvalid() &&
              "Reference to invented variable cannot fail!");
@@ -1668,7 +1668,7 @@
     InitializationSequence InitSeq(SemaRef, Entities.back(), InitKind,
                                    &CopyCtorArgE, 1);
     
-    Sema::OwningExprResult MemberInit
+    ExprResult MemberInit
       = InitSeq.Perform(SemaRef, Entities.back(), InitKind, 
                         Sema::MultiExprArg(SemaRef, &CopyCtorArgE, 1));
     MemberInit = SemaRef.MaybeCreateCXXExprWithTemporaries(MemberInit.get());
@@ -1694,7 +1694,7 @@
       InitializationKind::CreateDefault(Loc);
     
     InitializationSequence InitSeq(SemaRef, InitEntity, InitKind, 0, 0);
-    Sema::OwningExprResult MemberInit = 
+    ExprResult MemberInit = 
       InitSeq.Perform(SemaRef, InitEntity, InitKind, 
                       Sema::MultiExprArg(SemaRef, 0, 0));
     if (MemberInit.isInvalid())
@@ -4540,7 +4540,7 @@
 /// \param Depth Internal parameter recording the depth of the recursion.
 ///
 /// \returns A statement or a loop that copies the expressions.
-static OwningStmtResult
+static StmtResult
 BuildSingleCopyAssign(Sema &S, SourceLocation Loc, QualType T, 
                       Expr *To, Expr *From,
                       bool CopyingBaseSubobject, unsigned Depth = 0) {
@@ -4600,7 +4600,7 @@
                                                T.getTypePtr()));
     
     // Create the reference to operator=.
-    OwningExprResult OpEqualRef
+    ExprResult OpEqualRef
       = S.BuildMemberReferenceExpr(To, T, Loc, /*isArrow=*/false, SS, 
                                    /*FirstQualifierInScope=*/0, OpLookup, 
                                    /*TemplateArgs=*/0,
@@ -4610,7 +4610,7 @@
     
     // Build the call to the assignment operator.
 
-    OwningExprResult Call = S.BuildCallToMemberFunction(/*Scope=*/0, 
+    ExprResult Call = S.BuildCallToMemberFunction(/*Scope=*/0, 
                                                       OpEqualRef.takeAs<Expr>(),
                                                         Loc, &From, 1, 0, Loc);
     if (Call.isInvalid())
@@ -4623,7 +4623,7 @@
   //       operator is used.
   const ConstantArrayType *ArrayTy = S.Context.getAsConstantArrayType(T);  
   if (!ArrayTy) {
-    OwningExprResult Assignment = S.CreateBuiltinBinOp(Loc,
+    ExprResult Assignment = S.CreateBuiltinBinOp(Loc,
                                                        BinaryOperator::Assign,
                                                        To,
                                                        From);
@@ -4690,7 +4690,7 @@
                                                        IterationVarRef, Loc));
   
   // Build the copy for an individual element of the array.
-  OwningStmtResult Copy = BuildSingleCopyAssign(S, Loc, 
+  StmtResult Copy = BuildSingleCopyAssign(S, Loc, 
                                                 ArrayTy->getElementType(),
                                                 To, From, 
                                                 CopyingBaseSubobject, Depth+1);
@@ -4970,7 +4970,7 @@
                       ImplicitCastExpr::LValue, &BasePath);
 
     // Dereference "this".
-    OwningExprResult To = CreateBuiltinUnaryOp(Loc, UnaryOperator::Deref, This);
+    ExprResult To = CreateBuiltinUnaryOp(Loc, UnaryOperator::Deref, This);
     
     // Implicitly cast "this" to the appropriately-qualified base type.
     Expr *ToE = To.takeAs<Expr>();
@@ -4982,7 +4982,7 @@
     To = Owned(ToE);
 
     // Build the copy.
-    OwningStmtResult Copy = BuildSingleCopyAssign(*this, Loc, BaseType,
+    StmtResult Copy = BuildSingleCopyAssign(*this, Loc, BaseType,
                                                   To.get(), From,
                                                 /*CopyingBaseSubobject=*/true);
     if (Copy.isInvalid()) {
@@ -5041,10 +5041,10 @@
                               LookupMemberName);
     MemberLookup.addDecl(*Field);
     MemberLookup.resolveKind();
-    OwningExprResult From = BuildMemberReferenceExpr(OtherRef, OtherRefType,
+    ExprResult From = BuildMemberReferenceExpr(OtherRef, OtherRefType,
                                                      Loc, /*IsArrow=*/false,
                                                      SS, 0, MemberLookup, 0);
-    OwningExprResult To = BuildMemberReferenceExpr(This, This->getType(),
+    ExprResult To = BuildMemberReferenceExpr(This, This->getType(),
                                                    Loc, /*IsArrow=*/true,
                                                    SS, 0, MemberLookup, 0);
     assert(!From.isInvalid() && "Implicit field reference cannot fail");
@@ -5128,7 +5128,7 @@
       llvm::SmallVector<SourceLocation, 4> Commas; // FIXME: Silly
       Commas.push_back(Loc);
       Commas.push_back(Loc);
-      OwningExprResult Call = ExprError();
+      ExprResult Call = ExprError();
       if (NeedsCollectableMemCpy)
         Call = ActOnCallExpr(/*Scope=*/0,
                              CollectableMemCpyRef,
@@ -5146,7 +5146,7 @@
     }
     
     // Build the copy of this field.
-    OwningStmtResult Copy = BuildSingleCopyAssign(*this, Loc, FieldType, 
+    StmtResult Copy = BuildSingleCopyAssign(*this, Loc, FieldType, 
                                                   To.get(), From.get(),
                                               /*CopyingBaseSubobject=*/false);
     if (Copy.isInvalid()) {
@@ -5162,10 +5162,10 @@
 
   if (!Invalid) {
     // Add a "return *this;"
-    OwningExprResult ThisObj = CreateBuiltinUnaryOp(Loc, UnaryOperator::Deref,
+    ExprResult ThisObj = CreateBuiltinUnaryOp(Loc, UnaryOperator::Deref,
                                                     This);
     
-    OwningStmtResult Return = ActOnReturnStmt(Loc, ThisObj.get());
+    StmtResult Return = ActOnReturnStmt(Loc, ThisObj.get());
     if (Return.isInvalid())
       Invalid = true;
     else {
@@ -5184,7 +5184,7 @@
     return;
   }
   
-  OwningStmtResult Body = ActOnCompoundStmt(Loc, Loc, move_arg(Statements),
+  StmtResult Body = ActOnCompoundStmt(Loc, Loc, move_arg(Statements),
                                             /*isStmtExpr=*/false);
   assert(!Body.isInvalid() && "Compound statement creation cannot fail");
   CopyAssignOperator->setBody(Body.takeAs<Stmt>());
@@ -5393,7 +5393,7 @@
   CopyConstructor->setUsed();
 }
 
-Sema::OwningExprResult
+ExprResult
 Sema::BuildCXXConstructExpr(SourceLocation ConstructLoc, QualType DeclInitType,
                             CXXConstructorDecl *Constructor,
                             MultiExprArg ExprArgs,
@@ -5426,7 +5426,7 @@
 
 /// BuildCXXConstructExpr - Creates a complete call to a constructor,
 /// including handling of its default argument expressions.
-Sema::OwningExprResult
+ExprResult
 Sema::BuildCXXConstructExpr(SourceLocation ConstructLoc, QualType DeclInitType,
                             CXXConstructorDecl *Constructor, bool Elidable,
                             MultiExprArg ExprArgs,
@@ -5444,7 +5444,7 @@
 bool Sema::InitializeVarWithConstructor(VarDecl *VD,
                                         CXXConstructorDecl *Constructor,
                                         MultiExprArg Exprs) {
-  OwningExprResult TempResult =
+  ExprResult TempResult =
     BuildCXXConstructExpr(VD->getLocation(), VD->getType(), Constructor,
                           move(Exprs));
   if (TempResult.isInvalid())
@@ -5579,7 +5579,7 @@
   
   InitializationSequence InitSeq(*this, Entity, Kind, 
                                  Exprs.get(), Exprs.size());
-  OwningExprResult Result = InitSeq.Perform(*this, Entity, Kind, move(Exprs));
+  ExprResult Result = InitSeq.Perform(*this, Entity, Kind, move(Exprs));
   if (Result.isInvalid()) {
     VDecl->setInvalidDecl();
     return;
@@ -6146,7 +6146,7 @@
       InitializationKind Kind = InitializationKind::CreateCopy(Loc, 
                                                                SourceLocation());
       InitializationSequence InitSeq(*this, Entity, Kind, &ExDeclRef, 1);
-      OwningExprResult Result = InitSeq.Perform(*this, Entity, Kind, 
+      ExprResult Result = InitSeq.Perform(*this, Entity, Kind, 
                                          MultiExprArg(*this, &ExDeclRef, 1));
       if (Result.isInvalid())
         Invalid = true;
@@ -6934,7 +6934,7 @@
         InitializationKind::CreateDefault(ObjCImplementation->getLocation());
       
       InitializationSequence InitSeq(*this, InitEntity, InitKind, 0, 0);
-      Sema::OwningExprResult MemberInit = 
+      ExprResult MemberInit = 
         InitSeq.Perform(*this, InitEntity, InitKind, 
                         Sema::MultiExprArg(*this, 0, 0));
       MemberInit = MaybeCreateCXXExprWithTemporaries(MemberInit.get());

Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=111903&r1=111902&r2=111903&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Tue Aug 24 01:29:42 2010
@@ -371,7 +371,7 @@
 /// multiple tokens.  However, the common case is that StringToks points to one
 /// string.
 ///
-Action::OwningExprResult
+ExprResult
 Sema::ActOnStringLiteral(const Token *StringToks, unsigned NumStringToks) {
   assert(NumStringToks && "Must have at least one string!");
 
@@ -459,7 +459,7 @@
 }
 
 
-Sema::OwningExprResult
+ExprResult
 Sema::BuildDeclRefExpr(ValueDecl *D, QualType Ty, SourceLocation Loc,
                        const CXXScopeSpec *SS) {
   DeclarationNameInfo NameInfo(D->getDeclName(), Loc);
@@ -467,7 +467,7 @@
 }
 
 /// BuildDeclRefExpr - Build a DeclRefExpr.
-Sema::OwningExprResult
+ExprResult
 Sema::BuildDeclRefExpr(ValueDecl *D, QualType Ty,
                        const DeclarationNameInfo &NameInfo,
                        const CXXScopeSpec *SS) {
@@ -543,7 +543,7 @@
   return BaseObject;
 }
 
-Sema::OwningExprResult
+ExprResult
 Sema::BuildAnonymousStructUnionMemberReference(SourceLocation Loc,
                                                FieldDecl *Field,
                                                Expr *BaseObjectExpr,
@@ -1061,7 +1061,7 @@
   return 0;
 }
 
-Sema::OwningExprResult Sema::ActOnIdExpression(Scope *S,
+ExprResult Sema::ActOnIdExpression(Scope *S,
                                                CXXScopeSpec &SS,
                                                UnqualifiedId &Id,
                                                bool HasTrailingLParen,
@@ -1134,7 +1134,7 @@
     // If this reference is in an Objective-C method, then we need to do
     // some special Objective-C lookup, too.
     if (IvarLookupFollowUp) {
-      OwningExprResult E(LookupInObjCMethod(R, S, II, true));
+      ExprResult E(LookupInObjCMethod(R, S, II, true));
       if (E.isInvalid())
         return ExprError();
 
@@ -1180,7 +1180,7 @@
       // reference the ivar.
       if (ObjCIvarDecl *Ivar = R.getAsSingle<ObjCIvarDecl>()) {
         R.clear();
-        OwningExprResult E(LookupInObjCMethod(R, S, Ivar->getIdentifier()));
+        ExprResult E(LookupInObjCMethod(R, S, Ivar->getIdentifier()));
         assert(E.isInvalid() || E.get());
         return move(E);
       }
@@ -1241,7 +1241,7 @@
 }
 
 /// Builds an expression which might be an implicit member expression.
-Sema::OwningExprResult
+ExprResult
 Sema::BuildPossibleImplicitMemberExpr(const CXXScopeSpec &SS,
                                       LookupResult &R,
                                 const TemplateArgumentListInfo *TemplateArgs) {
@@ -1280,7 +1280,7 @@
 /// declaration name, generally during template instantiation.
 /// There's a large number of things which don't need to be done along
 /// this path.
-Sema::OwningExprResult
+ExprResult
 Sema::BuildQualifiedDeclarationNameExpr(CXXScopeSpec &SS,
                                         const DeclarationNameInfo &NameInfo) {
   DeclContext *DC;
@@ -1313,7 +1313,7 @@
 /// actually quite a lot of extra work involved.
 ///
 /// Returns a null sentinel to indicate trivial success.
-Sema::OwningExprResult
+ExprResult
 Sema::LookupInObjCMethod(LookupResult &Lookup, Scope *S,
                          IdentifierInfo *II, bool AllowBuiltinCreation) {
   SourceLocation Loc = Lookup.getNameLoc();
@@ -1368,7 +1368,7 @@
       UnqualifiedId SelfName;
       SelfName.setIdentifier(&II, SourceLocation());
       CXXScopeSpec SelfScopeSpec;
-      OwningExprResult SelfExpr = ActOnIdExpression(S, SelfScopeSpec,
+      ExprResult SelfExpr = ActOnIdExpression(S, SelfScopeSpec,
                                                     SelfName, false, false);
       MarkDeclarationReferenced(Loc, IV);
       return Owned(new (Context)
@@ -1593,7 +1593,7 @@
 /// is known to be an instance method, and the given unqualified lookup
 /// set is known to contain only instance members, at least one of which
 /// is from an appropriate type.
-Sema::OwningExprResult
+ExprResult
 Sema::BuildImplicitMemberExpr(const CXXScopeSpec &SS,
                               LookupResult &R,
                               const TemplateArgumentListInfo *TemplateArgs,
@@ -1709,7 +1709,7 @@
   return false;
 }
 
-Sema::OwningExprResult
+ExprResult
 Sema::BuildDeclarationNameExpr(const CXXScopeSpec &SS,
                                LookupResult &R,
                                bool NeedsADL) {
@@ -1745,7 +1745,7 @@
 
 
 /// \brief Complete semantic analysis for a reference to the given declaration.
-Sema::OwningExprResult
+ExprResult
 Sema::BuildDeclarationNameExpr(const CXXScopeSpec &SS,
                                const DeclarationNameInfo &NameInfo,
                                NamedDecl *D) {
@@ -1828,7 +1828,7 @@
                     DeclRefExpr(const_cast<ValueDecl*>(BDRE->getDecl()), T,
                                           SourceLocation());
       
-        OwningExprResult Res = PerformCopyInitialization(
+        ExprResult Res = PerformCopyInitialization(
                           InitializedEntity::InitializeBlock(VD->getLocation(), 
                                                          T, false),
                                                          SourceLocation(),
@@ -1849,7 +1849,7 @@
                           NameInfo, &SS);
 }
 
-Sema::OwningExprResult Sema::ActOnPredefinedExpr(SourceLocation Loc,
+ExprResult Sema::ActOnPredefinedExpr(SourceLocation Loc,
                                                  tok::TokenKind Kind) {
   PredefinedExpr::IdentType IT;
 
@@ -1884,7 +1884,7 @@
   return Owned(new (Context) PredefinedExpr(Loc, ResTy, IT));
 }
 
-Sema::OwningExprResult Sema::ActOnCharacterConstant(const Token &Tok) {
+ExprResult Sema::ActOnCharacterConstant(const Token &Tok) {
   llvm::SmallString<16> CharBuffer;
   bool Invalid = false;
   llvm::StringRef ThisTok = PP.getSpelling(Tok, CharBuffer, &Invalid);
@@ -1911,7 +1911,7 @@
                                               Ty, Tok.getLocation()));
 }
 
-Action::OwningExprResult Sema::ActOnNumericConstant(const Token &Tok) {
+ExprResult Sema::ActOnNumericConstant(const Token &Tok) {
   // Fast path for a single digit (which is quite common).  A single digit
   // cannot have a trigraph, escaped newline, radix prefix, or type suffix.
   if (Tok.getLength() == 1) {
@@ -2073,7 +2073,7 @@
   return Owned(Res);
 }
 
-Action::OwningExprResult Sema::ActOnParenExpr(SourceLocation L,
+ExprResult Sema::ActOnParenExpr(SourceLocation L,
                                               SourceLocation R, Expr *E) {
   assert((E != 0) && "ActOnParenExpr() missing expr");
   return Owned(new (Context) ParenExpr(L, R, E));
@@ -2158,7 +2158,7 @@
 }
 
 /// \brief Build a sizeof or alignof expression given a type operand.
-Action::OwningExprResult
+ExprResult
 Sema::CreateSizeOfAlignOfExpr(TypeSourceInfo *TInfo,
                               SourceLocation OpLoc,
                               bool isSizeOf, SourceRange R) {
@@ -2179,7 +2179,7 @@
 
 /// \brief Build a sizeof or alignof expression given an expression
 /// operand.
-Action::OwningExprResult
+ExprResult
 Sema::CreateSizeOfAlignOfExpr(Expr *E, SourceLocation OpLoc,
                               bool isSizeOf, SourceRange R) {
   // Verify that the operand is valid.
@@ -2207,7 +2207,7 @@
 /// ActOnSizeOfAlignOfExpr - Handle @c sizeof(type) and @c sizeof @c expr and
 /// the same for @c alignof and @c __alignof
 /// Note that the ArgRange is invalid if isType is false.
-Action::OwningExprResult
+ExprResult
 Sema::ActOnSizeOfAlignOfExpr(SourceLocation OpLoc, bool isSizeof, bool isType,
                              void *TyOrEx, const SourceRange &ArgRange) {
   // If error parsing type, ignore.
@@ -2220,7 +2220,7 @@
   }
 
   Expr *ArgEx = (Expr *)TyOrEx;
-  Action::OwningExprResult Result
+  ExprResult Result
     = CreateSizeOfAlignOfExpr(ArgEx, OpLoc, isSizeof, ArgEx->getSourceRange());
 
   if (Result.isInvalid())
@@ -2249,7 +2249,7 @@
 
 
 
-Action::OwningExprResult
+ExprResult
 Sema::ActOnPostfixUnaryOp(Scope *S, SourceLocation OpLoc,
                           tok::TokenKind Kind, Expr *Input) {
   UnaryOperator::Opcode Opc;
@@ -2262,11 +2262,11 @@
   return BuildUnaryOp(S, OpLoc, Opc, Input);
 }
 
-Action::OwningExprResult
+ExprResult
 Sema::ActOnArraySubscriptExpr(Scope *S, Expr *Base, SourceLocation LLoc,
                               Expr *Idx, SourceLocation RLoc) {
   // Since this might be a postfix expression, get rid of ParenListExprs.
-  OwningExprResult Result = MaybeConvertParenListExprToParenExpr(S, Base);
+  ExprResult Result = MaybeConvertParenListExprToParenExpr(S, Base);
   if (Result.isInvalid()) return ExprError();
   Base = Result.take();
 
@@ -2290,7 +2290,7 @@
 }
 
 
-Action::OwningExprResult
+ExprResult
 Sema::CreateBuiltinArraySubscriptExpr(Expr *Base, SourceLocation LLoc,
                                      Expr *Idx, SourceLocation RLoc) {
   Expr *LHSExp = Base;
@@ -2541,7 +2541,7 @@
   return GDecl;
 }
 
-Sema::OwningExprResult
+ExprResult
 Sema::ActOnDependentMemberExpr(Expr *BaseExpr, QualType BaseType,
                                bool IsArrow, SourceLocation OpLoc,
                                const CXXScopeSpec &SS,
@@ -2718,7 +2718,7 @@
   return false;
 }
 
-Sema::OwningExprResult
+ExprResult
 Sema::BuildMemberReferenceExpr(Expr *Base, QualType BaseType,
                                SourceLocation OpLoc, bool IsArrow,
                                CXXScopeSpec &SS,
@@ -2745,7 +2745,7 @@
 
   // Explicit member accesses.
   } else {
-    OwningExprResult Result =
+    ExprResult Result =
       LookupMemberExpr(R, Base, IsArrow, OpLoc,
                        SS, /*ObjCImpDecl*/ 0, TemplateArgs != 0);
 
@@ -2766,7 +2766,7 @@
                                   R, TemplateArgs);
 }
 
-Sema::OwningExprResult
+ExprResult
 Sema::BuildMemberReferenceExpr(Expr *BaseExpr, QualType BaseExprType,
                                SourceLocation OpLoc, bool IsArrow,
                                const CXXScopeSpec &SS,
@@ -2957,7 +2957,7 @@
 ///
 /// The ObjCImpDecl bit is a gross hack that will need to be properly
 /// fixed for ObjC++.
-Sema::OwningExprResult
+ExprResult
 Sema::LookupMemberExpr(LookupResult &R, Expr *&BaseExpr,
                        bool &IsArrow, SourceLocation OpLoc,
                        CXXScopeSpec &SS,
@@ -2991,7 +2991,7 @@
           << QualType(Fun, 0)
           << FixItHint::CreateInsertion(Loc, "()");
 
-        OwningExprResult NewBase
+        ExprResult NewBase
           = ActOnCallExpr(0, BaseExpr, Loc,
                           MultiExprArg(*this, 0, 0), 0, Loc);
         BaseExpr = 0;
@@ -3304,7 +3304,7 @@
 /// \param ObjCImpDecl the current ObjC @implementation decl;
 ///   this is an ugly hack around the fact that ObjC @implementations
 ///   aren't properly put in the context chain
-Sema::OwningExprResult Sema::ActOnMemberAccessExpr(Scope *S, Expr *Base,
+ExprResult Sema::ActOnMemberAccessExpr(Scope *S, Expr *Base,
                                                    SourceLocation OpLoc,
                                                    tok::TokenKind OpKind,
                                                    CXXScopeSpec &SS,
@@ -3330,7 +3330,7 @@
                        static_cast<NestedNameSpecifier*>(SS.getScopeRep())));
 
   // This is a postfix expression, so get rid of ParenListExprs.
-  OwningExprResult Result = MaybeConvertParenListExprToParenExpr(S, Base);
+  ExprResult Result = MaybeConvertParenListExprToParenExpr(S, Base);
   if (Result.isInvalid()) return ExprError();
   Base = Result.take();
 
@@ -3370,7 +3370,7 @@
   return move(Result);
 }
 
-Sema::OwningExprResult Sema::BuildCXXDefaultArgExpr(SourceLocation CallLoc,
+ExprResult Sema::BuildCXXDefaultArgExpr(SourceLocation CallLoc,
                                                     FunctionDecl *FD,
                                                     ParmVarDecl *Param) {
   if (Param->hasUnparsedDefaultArg()) {
@@ -3392,7 +3392,7 @@
       InstantiatingTemplate Inst(*this, CallLoc, Param, Innermost.first,
                                  Innermost.second);
 
-      OwningExprResult Result = SubstExpr(UninstExpr, ArgList);
+      ExprResult Result = SubstExpr(UninstExpr, ArgList);
       if (Result.isInvalid())
         return ExprError();
 
@@ -3525,7 +3525,7 @@
       InitializedEntity Entity =
         Param? InitializedEntity::InitializeParameter(Param)
              : InitializedEntity::InitializeParameter(ProtoArgType);
-      OwningExprResult ArgE = PerformCopyInitialization(Entity,
+      ExprResult ArgE = PerformCopyInitialization(Entity,
                                                         SourceLocation(),
                                                         Owned(Arg));
       if (ArgE.isInvalid())
@@ -3535,7 +3535,7 @@
     } else {
       ParmVarDecl *Param = FDecl->getParamDecl(i);
 
-      OwningExprResult ArgExpr =
+      ExprResult ArgExpr =
         BuildCXXDefaultArgExpr(CallLoc, FDecl, Param);
       if (ArgExpr.isInvalid())
         return true;
@@ -3560,14 +3560,14 @@
 /// ActOnCallExpr - Handle a call to Fn with the specified array of arguments.
 /// This provides the location of the left/right parens and a list of comma
 /// locations.
-Action::OwningExprResult
+ExprResult
 Sema::ActOnCallExpr(Scope *S, Expr *Fn, SourceLocation LParenLoc,
                     MultiExprArg args,
                     SourceLocation *CommaLocs, SourceLocation RParenLoc) {
   unsigned NumArgs = args.size();
 
   // Since this might be a postfix expression, get rid of ParenListExprs.
-  OwningExprResult Result = MaybeConvertParenListExprToParenExpr(S, Fn);
+  ExprResult Result = MaybeConvertParenListExprToParenExpr(S, Fn);
   if (Result.isInvalid()) return ExprError();
   Fn = Result.take();
 
@@ -3690,7 +3690,7 @@
 /// block-pointer type.
 ///
 /// \param NDecl the declaration being called, if available
-Sema::OwningExprResult
+ExprResult
 Sema::BuildResolvedCallExpr(Expr *Fn, NamedDecl *NDecl,
                             SourceLocation LParenLoc,
                             Expr **Args, unsigned NumArgs,
@@ -3791,7 +3791,7 @@
   return MaybeBindToTemporary(TheCall);
 }
 
-Action::OwningExprResult
+ExprResult
 Sema::ActOnCompoundLiteral(SourceLocation LParenLoc, ParsedType Ty,
                            SourceLocation RParenLoc, Expr *InitExpr) {
   assert((Ty != 0) && "ActOnCompoundLiteral(): missing type");
@@ -3806,7 +3806,7 @@
   return BuildCompoundLiteralExpr(LParenLoc, TInfo, RParenLoc, InitExpr);
 }
 
-Action::OwningExprResult
+ExprResult
 Sema::BuildCompoundLiteralExpr(SourceLocation LParenLoc, TypeSourceInfo *TInfo,
                                SourceLocation RParenLoc, Expr *literalExpr) {
   QualType literalType = TInfo->getType();
@@ -3828,7 +3828,7 @@
     = InitializationKind::CreateCast(SourceRange(LParenLoc, RParenLoc),
                                      /*IsCStyleCast=*/true);
   InitializationSequence InitSeq(*this, Entity, Kind, &literalExpr, 1);
-  OwningExprResult Result = InitSeq.Perform(*this, Entity, Kind,
+  ExprResult Result = InitSeq.Perform(*this, Entity, Kind,
                                        MultiExprArg(*this, &literalExpr, 1),
                                             &literalType);
   if (Result.isInvalid())
@@ -3845,7 +3845,7 @@
                                                  literalExpr, isFileScope));
 }
 
-Action::OwningExprResult
+ExprResult
 Sema::ActOnInitList(SourceLocation LBraceLoc, MultiExprArg initlist,
                     SourceLocation RBraceLoc) {
   unsigned NumInit = initlist.size();
@@ -4046,7 +4046,7 @@
   return false;
 }
 
-Action::OwningExprResult
+ExprResult
 Sema::ActOnCastExpr(Scope *S, SourceLocation LParenLoc, ParsedType Ty,
                     SourceLocation RParenLoc, Expr *castExpr) {
   assert((Ty != 0) && (castExpr != 0) &&
@@ -4065,7 +4065,7 @@
   return BuildCStyleCastExpr(LParenLoc, castTInfo, RParenLoc, castExpr);
 }
 
-Action::OwningExprResult
+ExprResult
 Sema::BuildCStyleCastExpr(SourceLocation LParenLoc, TypeSourceInfo *Ty,
                           SourceLocation RParenLoc, Expr *castExpr) {
   CastExpr::CastKind Kind = CastExpr::CK_Unknown;
@@ -4082,13 +4082,13 @@
 
 /// This is not an AltiVec-style cast, so turn the ParenListExpr into a sequence
 /// of comma binary operators.
-OwningExprResult
+ExprResult
 Sema::MaybeConvertParenListExprToParenExpr(Scope *S, Expr *expr) {
   ParenListExpr *E = dyn_cast<ParenListExpr>(expr);
   if (!E)
     return Owned(expr);
 
-  OwningExprResult Result(E->getExpr(0));
+  ExprResult Result(E->getExpr(0));
 
   for (unsigned i = 1, e = E->getNumExprs(); i != e && !Result.isInvalid(); ++i)
     Result = ActOnBinOp(S, E->getExprLoc(), tok::comma, Result.get(),
@@ -4099,7 +4099,7 @@
   return ActOnParenExpr(E->getLParenLoc(), E->getRParenLoc(), Result.get());
 }
 
-Action::OwningExprResult
+ExprResult
 Sema::ActOnCastOfParenListExpr(Scope *S, SourceLocation LParenLoc,
                                SourceLocation RParenLoc, Expr *Op,
                                TypeSourceInfo *TInfo) {
@@ -4139,13 +4139,13 @@
   } else {
     // This is not an AltiVec-style cast, so turn the ParenListExpr into a
     // sequence of BinOp comma operators.
-    OwningExprResult Result = MaybeConvertParenListExprToParenExpr(S, Op);
+    ExprResult Result = MaybeConvertParenListExprToParenExpr(S, Op);
     if (Result.isInvalid()) return ExprError();
     return BuildCStyleCastExpr(LParenLoc, TInfo, RParenLoc, Result.take());
   }
 }
 
-Action::OwningExprResult Sema::ActOnParenOrParenListExpr(SourceLocation L,
+ExprResult Sema::ActOnParenOrParenListExpr(SourceLocation L,
                                                   SourceLocation R,
                                                   MultiExprArg Val,
                                                   ParsedType TypeOfCast) {
@@ -4483,7 +4483,7 @@
 
 /// ActOnConditionalOp - Parse a ?: operation.  Note that 'LHS' may be null
 /// in the case of a the GNU conditional expr extension.
-Action::OwningExprResult Sema::ActOnConditionalOp(SourceLocation QuestionLoc,
+ExprResult Sema::ActOnConditionalOp(SourceLocation QuestionLoc,
                                                   SourceLocation ColonLoc,
                                                   Expr *CondExpr, Expr *LHSExpr,
                                                   Expr *RHSExpr) {
@@ -6418,7 +6418,7 @@
 /// CreateBuiltinBinOp - Creates a new built-in binary operation with
 /// operator @p Opc at location @c TokLoc. This routine only supports
 /// built-in operations; ActOnBinOp handles overloaded operators.
-Action::OwningExprResult Sema::CreateBuiltinBinOp(SourceLocation OpLoc,
+ExprResult Sema::CreateBuiltinBinOp(SourceLocation OpLoc,
                                                   unsigned Op,
                                                   Expr *lhs, Expr *rhs) {
   QualType ResultTy;     // Result type of the binary operator.
@@ -6628,7 +6628,7 @@
 }
 
 // Binary Operators.  'Tok' is the token for the operator.
-Action::OwningExprResult Sema::ActOnBinOp(Scope *S, SourceLocation TokLoc,
+ExprResult Sema::ActOnBinOp(Scope *S, SourceLocation TokLoc,
                                           tok::TokenKind Kind,
                                           Expr *lhs, Expr *rhs) {
   BinaryOperator::Opcode Opc = ConvertTokenKindToBinaryOpcode(Kind);
@@ -6641,7 +6641,7 @@
   return BuildBinOp(S, TokLoc, Opc, lhs, rhs);
 }
 
-Action::OwningExprResult Sema::BuildBinOp(Scope *S, SourceLocation OpLoc,
+ExprResult Sema::BuildBinOp(Scope *S, SourceLocation OpLoc,
                                           BinaryOperator::Opcode Opc,
                                           Expr *lhs, Expr *rhs) {
   if (getLangOptions().CPlusPlus &&
@@ -6666,7 +6666,7 @@
   return CreateBuiltinBinOp(OpLoc, Opc, lhs, rhs);
 }
 
-Action::OwningExprResult Sema::CreateBuiltinUnaryOp(SourceLocation OpLoc,
+ExprResult Sema::CreateBuiltinUnaryOp(SourceLocation OpLoc,
                                                     unsigned OpcIn,
                                                     Expr *Input) {
   UnaryOperator::Opcode Opc = static_cast<UnaryOperator::Opcode>(OpcIn);
@@ -6750,7 +6750,7 @@
   return Owned(new (Context) UnaryOperator(Input, Opc, resultType, OpLoc));
 }
 
-Action::OwningExprResult Sema::BuildUnaryOp(Scope *S, SourceLocation OpLoc,
+ExprResult Sema::BuildUnaryOp(Scope *S, SourceLocation OpLoc,
                                             UnaryOperator::Opcode Opc,
                                             Expr *Input) {
   if (getLangOptions().CPlusPlus && Input->getType()->isOverloadableType() &&
@@ -6772,13 +6772,13 @@
 }
 
 // Unary Operators.  'Tok' is the token for the operator.
-Action::OwningExprResult Sema::ActOnUnaryOp(Scope *S, SourceLocation OpLoc,
+ExprResult Sema::ActOnUnaryOp(Scope *S, SourceLocation OpLoc,
                                             tok::TokenKind Op, Expr *Input) {
   return BuildUnaryOp(S, OpLoc, ConvertTokenKindToUnaryOpcode(Op), Input);
 }
 
 /// ActOnAddrLabel - Parse the GNU address of label extension: "&&foo".
-Sema::OwningExprResult Sema::ActOnAddrLabel(SourceLocation OpLoc,
+ExprResult Sema::ActOnAddrLabel(SourceLocation OpLoc,
                                             SourceLocation LabLoc,
                                             IdentifierInfo *LabelII) {
   // Look up the record for this label identifier.
@@ -6794,7 +6794,7 @@
                                        Context.getPointerType(Context.VoidTy)));
 }
 
-Sema::OwningExprResult
+ExprResult
 Sema::ActOnStmtExpr(SourceLocation LPLoc, Stmt *SubStmt,
                     SourceLocation RPLoc) { // "({..})"
   assert(SubStmt && isa<CompoundStmt>(SubStmt) && "Invalid action invocation!");
@@ -6829,7 +6829,7 @@
   return Owned(new (Context) StmtExpr(Compound, Ty, LPLoc, RPLoc));
 }
 
-Sema::OwningExprResult Sema::BuildBuiltinOffsetOf(SourceLocation BuiltinLoc,
+ExprResult Sema::BuildBuiltinOffsetOf(SourceLocation BuiltinLoc,
                                                   TypeSourceInfo *TInfo,
                                                   OffsetOfComponent *CompPtr,
                                                   unsigned NumComponents,
@@ -6985,7 +6985,7 @@
                                     Exprs.data(), Exprs.size(), RParenLoc));  
 }
 
-Sema::OwningExprResult Sema::ActOnBuiltinOffsetOf(Scope *S,
+ExprResult Sema::ActOnBuiltinOffsetOf(Scope *S,
                                                   SourceLocation BuiltinLoc,
                                                   SourceLocation TypeLoc,
                                                   ParsedType argty,
@@ -7006,7 +7006,7 @@
 }
 
 
-Sema::OwningExprResult Sema::ActOnTypesCompatibleExpr(SourceLocation BuiltinLoc,
+ExprResult Sema::ActOnTypesCompatibleExpr(SourceLocation BuiltinLoc,
                                                       ParsedType arg1,ParsedType arg2,
                                                       SourceLocation RPLoc) {
   TypeSourceInfo *argTInfo1;
@@ -7019,7 +7019,7 @@
   return BuildTypesCompatibleExpr(BuiltinLoc, argTInfo1, argTInfo2, RPLoc);
 }
 
-Sema::OwningExprResult
+ExprResult
 Sema::BuildTypesCompatibleExpr(SourceLocation BuiltinLoc,
                                TypeSourceInfo *argTInfo1,
                                TypeSourceInfo *argTInfo2,
@@ -7035,7 +7035,7 @@
 }
 
 
-Sema::OwningExprResult Sema::ActOnChooseExpr(SourceLocation BuiltinLoc,
+ExprResult Sema::ActOnChooseExpr(SourceLocation BuiltinLoc,
                                              Expr *CondExpr,
                                              Expr *LHSExpr, Expr *RHSExpr,
                                              SourceLocation RPLoc) {
@@ -7197,7 +7197,7 @@
 
 /// ActOnBlockStmtExpr - This is called when the body of a block statement
 /// literal was successfully completed.  ^(int x){...}
-Sema::OwningExprResult Sema::ActOnBlockStmtExpr(SourceLocation CaretLoc,
+ExprResult Sema::ActOnBlockStmtExpr(SourceLocation CaretLoc,
                                                 Stmt *Body, Scope *CurScope) {
   // If blocks are disabled, emit an error.
   if (!LangOpts.Blocks)
@@ -7296,7 +7296,7 @@
   return Owned(Result);
 }
 
-Sema::OwningExprResult Sema::ActOnVAArg(SourceLocation BuiltinLoc,
+ExprResult Sema::ActOnVAArg(SourceLocation BuiltinLoc,
                                         Expr *expr, ParsedType type,
                                         SourceLocation RPLoc) {
   TypeSourceInfo *TInfo;
@@ -7304,7 +7304,7 @@
   return BuildVAArgExpr(BuiltinLoc, expr, TInfo, RPLoc);
 }
 
-Sema::OwningExprResult Sema::BuildVAArgExpr(SourceLocation BuiltinLoc,
+ExprResult Sema::BuildVAArgExpr(SourceLocation BuiltinLoc,
                                             Expr *E, TypeSourceInfo *TInfo,
                                             SourceLocation RPLoc) {
   Expr *OrigExpr = E;
@@ -7342,7 +7342,7 @@
   return Owned(new (Context) VAArgExpr(BuiltinLoc, E, TInfo, RPLoc, T));
 }
 
-Sema::OwningExprResult Sema::ActOnGNUNullExpr(SourceLocation TokenLoc) {
+ExprResult Sema::ActOnGNUNullExpr(SourceLocation TokenLoc) {
   // The type of __null will be int or long, depending on the size of
   // pointers on the target.
   QualType Ty;
@@ -7870,8 +7870,8 @@
   return false;
 }
 
-Sema::OwningExprResult Sema::ActOnBooleanCondition(Scope *S, SourceLocation Loc,
-                                                   Expr *Sub) {
+ExprResult Sema::ActOnBooleanCondition(Scope *S, SourceLocation Loc,
+                                       Expr *Sub) {
   if (!Sub)
     return ExprError();
   

Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprCXX.cpp?rev=111903&r1=111902&r2=111903&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprCXX.cpp Tue Aug 24 01:29:42 2010
@@ -258,7 +258,7 @@
 }
 
 /// \brief Build a C++ typeid expression with a type operand.
-Sema::OwningExprResult Sema::BuildCXXTypeId(QualType TypeInfoType,
+ExprResult Sema::BuildCXXTypeId(QualType TypeInfoType,
                                             SourceLocation TypeidLoc,
                                             TypeSourceInfo *Operand,
                                             SourceLocation RParenLoc) {
@@ -281,7 +281,7 @@
 }
 
 /// \brief Build a C++ typeid expression with an expression operand.
-Sema::OwningExprResult Sema::BuildCXXTypeId(QualType TypeInfoType,
+ExprResult Sema::BuildCXXTypeId(QualType TypeInfoType,
                                             SourceLocation TypeidLoc,
                                             Expr *E,
                                             SourceLocation RParenLoc) {
@@ -333,7 +333,7 @@
 }
 
 /// ActOnCXXTypeidOfType - Parse typeid( type-id ) or typeid (expression);
-Action::OwningExprResult
+ExprResult
 Sema::ActOnCXXTypeid(SourceLocation OpLoc, SourceLocation LParenLoc,
                      bool isType, void *TyOrExpr, SourceLocation RParenLoc) {
   // Find the std::type_info type.
@@ -368,7 +368,7 @@
 }
 
 /// ActOnCXXBoolLiteral - Parse {true,false} literals.
-Action::OwningExprResult
+ExprResult
 Sema::ActOnCXXBoolLiteral(SourceLocation OpLoc, tok::TokenKind Kind) {
   assert((Kind == tok::kw_true || Kind == tok::kw_false) &&
          "Unknown C++ Boolean value!");
@@ -377,13 +377,13 @@
 }
 
 /// ActOnCXXNullPtrLiteral - Parse 'nullptr'.
-Action::OwningExprResult
+ExprResult
 Sema::ActOnCXXNullPtrLiteral(SourceLocation Loc) {
   return Owned(new (Context) CXXNullPtrLiteralExpr(Context.NullPtrTy, Loc));
 }
 
 /// ActOnCXXThrow - Parse throw expressions.
-Action::OwningExprResult
+ExprResult
 Sema::ActOnCXXThrow(SourceLocation OpLoc, Expr *Ex) {
   if (Ex && !Ex->isTypeDependent() && CheckCXXThrowOperand(OpLoc, Ex))
     return ExprError();
@@ -431,7 +431,7 @@
   InitializedEntity Entity =
     InitializedEntity::InitializeException(ThrowLoc, E->getType(),
                                            /*NRVO=*/false);
-  OwningExprResult Res = PerformCopyInitialization(Entity,
+  ExprResult Res = PerformCopyInitialization(Entity,
                                                    SourceLocation(),
                                                    Owned(E));
   if (Res.isInvalid())
@@ -463,7 +463,7 @@
   return false;
 }
 
-Action::OwningExprResult Sema::ActOnCXXThis(SourceLocation ThisLoc) {
+ExprResult Sema::ActOnCXXThis(SourceLocation ThisLoc) {
   /// C++ 9.3.2: In the body of a non-static member function, the keyword this
   /// is a non-lvalue expression whose value is the address of the object for
   /// which the function is called.
@@ -482,7 +482,7 @@
 /// Can be interpreted either as function-style casting ("int(x)")
 /// or class type construction ("ClassType(x,y,z)")
 /// or creation of a value-initialized type ("int()").
-Action::OwningExprResult
+ExprResult
 Sema::ActOnCXXTypeConstructExpr(SourceRange TypeRange, ParsedType TypeRep,
                                 SourceLocation LParenLoc,
                                 MultiExprArg exprs,
@@ -554,7 +554,7 @@
                  : InitializationKind::CreateValue(TypeRange.getBegin(), 
                                                    LParenLoc, RParenLoc);
     InitializationSequence InitSeq(*this, Entity, Kind, Exprs, NumExprs);
-    OwningExprResult Result = InitSeq.Perform(*this, Entity, Kind,
+    ExprResult Result = InitSeq.Perform(*this, Entity, Kind,
                                               move(exprs));
 
     // FIXME: Improve AST representation?
@@ -586,7 +586,7 @@
 /// or
 /// @code ::new Foo(23, "hello") @endcode
 /// For the interpretation of this heap of arguments, consult the base version.
-Action::OwningExprResult
+ExprResult
 Sema::ActOnCXXNew(SourceLocation StartLoc, bool UseGlobal,
                   SourceLocation PlacementLParen, MultiExprArg PlacementArgs,
                   SourceLocation PlacementRParen, SourceRange TypeIdParens, 
@@ -648,7 +648,7 @@
                      ConstructorRParen);
 }
 
-Sema::OwningExprResult
+ExprResult
 Sema::BuildCXXNew(SourceLocation StartLoc, bool UseGlobal,
                   SourceLocation PlacementLParen,
                   MultiExprArg PlacementArgs,
@@ -684,7 +684,7 @@
     
     QualType SizeType = ArraySize->getType();
     
-    OwningExprResult ConvertedSize
+    ExprResult ConvertedSize
       = ConvertToIntegralOrEnumerationType(StartLoc, ArraySize,
                                        PDiag(diag::err_array_size_not_integral),
                                      PDiag(diag::err_array_size_incomplete_type)
@@ -807,7 +807,7 @@
     InitializedEntity Entity
       = InitializedEntity::InitializeNew(StartLoc, AllocType);
     InitializationSequence InitSeq(*this, Entity, Kind, ConsArgs, NumConsArgs);
-    OwningExprResult FullInit = InitSeq.Perform(*this, Entity, Kind, 
+    ExprResult FullInit = InitSeq.Perform(*this, Entity, Kind, 
                                                 move(ConstructorArgs));
     if (FullInit.isInvalid())
       return ExprError();
@@ -1133,7 +1133,7 @@
     // Watch out for variadic allocator function.
     unsigned NumArgsInFnDecl = FnDecl->getNumParams();
     for (unsigned i = 0; (i < NumArgs && i < NumArgsInFnDecl); ++i) {
-      OwningExprResult Result
+      ExprResult Result
         = PerformCopyInitialization(InitializedEntity::InitializeParameter(
                                                        FnDecl->getParamDecl(i)),
                                     SourceLocation(),
@@ -1376,7 +1376,7 @@
 /// @code ::delete ptr; @endcode
 /// or
 /// @code delete [] ptr; @endcode
-Action::OwningExprResult
+ExprResult
 Sema::ActOnCXXDelete(SourceLocation StartLoc, bool UseGlobal,
                      bool ArrayForm, Expr *Ex) {
   // C++ [expr.delete]p1:
@@ -1500,7 +1500,7 @@
 
 /// \brief Check the use of the given variable as a C++ condition in an if,
 /// while, do-while, or switch statement.
-Action::OwningExprResult Sema::CheckConditionVariable(VarDecl *ConditionVar,
+ExprResult Sema::CheckConditionVariable(VarDecl *ConditionVar,
                                                       SourceLocation StmtLoc,
                                                       bool ConvertToBoolean) {
   QualType T = ConditionVar->getType();
@@ -1569,7 +1569,7 @@
   return false;
 }
 
-static Sema::OwningExprResult BuildCXXCastArgument(Sema &S, 
+static ExprResult BuildCXXCastArgument(Sema &S, 
                                                    SourceLocation CastLoc,
                                                    QualType Ty,
                                                    CastExpr::CastKind Kind,
@@ -1585,7 +1585,7 @@
                                   CastLoc, ConstructorArgs))
       return S.ExprError();
     
-    Sema::OwningExprResult Result = 
+    ExprResult Result = 
     S.BuildCXXConstructExpr(CastLoc, Ty, cast<CXXConstructorDecl>(Method), 
                             move_arg(ConstructorArgs));
     if (Result.isInvalid())
@@ -1655,7 +1655,7 @@
           return true;
       }
     
-      OwningExprResult CastArg 
+      ExprResult CastArg 
         = BuildCXXCastArgument(*this,
                                From->getLocStart(),
                                ToType.getNonReferenceType(),
@@ -1715,7 +1715,7 @@
                                   /*FIXME:ConstructLoc*/SourceLocation(), 
                                   ConstructorArgs))
         return true;
-      OwningExprResult FromResult =
+      ExprResult FromResult =
         BuildCXXConstructExpr(/*FIXME:ConstructLoc*/SourceLocation(),
                               ToType, SCS.CopyConstructor,
                               move_arg(ConstructorArgs));
@@ -1724,7 +1724,7 @@
       From = FromResult.takeAs<Expr>();
       return false;
     }
-    OwningExprResult FromResult =
+    ExprResult FromResult =
       BuildCXXConstructExpr(/*FIXME:ConstructLoc*/SourceLocation(),
                             ToType, SCS.CopyConstructor,
                             MultiExprArg(*this, &From, 1));
@@ -1922,7 +1922,7 @@
   return false;
 }
 
-Sema::OwningExprResult Sema::ActOnUnaryTypeTrait(UnaryTypeTrait OTT,
+ExprResult Sema::ActOnUnaryTypeTrait(UnaryTypeTrait OTT,
                                                  SourceLocation KWLoc,
                                                  SourceLocation LParen,
                                                  ParsedType Ty,
@@ -2172,7 +2172,7 @@
   InitializationKind Kind = InitializationKind::CreateCopy(E->getLocStart(),
                                                            SourceLocation());
   InitializationSequence InitSeq(Self, Entity, Kind, &E, 1);
-  Sema::OwningExprResult Result = InitSeq.Perform(Self, Entity, Kind, 
+  ExprResult Result = InitSeq.Perform(Self, Entity, Kind, 
                                     Sema::MultiExprArg(Self, &E, 1));
   if (Result.isInvalid())
     return true;
@@ -2312,13 +2312,13 @@
     if (LTy->isRecordType()) {
       // The operands have class type. Make a temporary copy.
       InitializedEntity Entity = InitializedEntity::InitializeTemporary(LTy);
-      OwningExprResult LHSCopy = PerformCopyInitialization(Entity, 
+      ExprResult LHSCopy = PerformCopyInitialization(Entity, 
                                                            SourceLocation(), 
                                                            Owned(LHS));
       if (LHSCopy.isInvalid())
         return QualType();
         
-      OwningExprResult RHSCopy = PerformCopyInitialization(Entity, 
+      ExprResult RHSCopy = PerformCopyInitialization(Entity, 
                                                            SourceLocation(), 
                                                            Owned(RHS));
       if (RHSCopy.isInvalid())
@@ -2554,14 +2554,14 @@
     }
 
     // Convert E1 to Composite1
-    OwningExprResult E1Result
+    ExprResult E1Result
       = E1ToC1.Perform(*this, Entity1, Kind, MultiExprArg(*this,&E1,1));
     if (E1Result.isInvalid())
       return QualType();
     E1 = E1Result.takeAs<Expr>();
 
     // Convert E2 to Composite1
-    OwningExprResult E2Result
+    ExprResult E2Result
       = E2ToC1.Perform(*this, Entity1, Kind, MultiExprArg(*this,&E2,1));
     if (E2Result.isInvalid())
       return QualType();
@@ -2579,14 +2579,14 @@
     return QualType();
   
   // Convert E1 to Composite2
-  OwningExprResult E1Result
+  ExprResult E1Result
     = E1ToC2.Perform(*this, Entity2, Kind, MultiExprArg(*this, &E1, 1));
   if (E1Result.isInvalid())
     return QualType();
   E1 = E1Result.takeAs<Expr>();
   
   // Convert E2 to Composite2
-  OwningExprResult E2Result
+  ExprResult E2Result
     = E2ToC2.Perform(*this, Entity2, Kind, MultiExprArg(*this, &E2, 1));
   if (E2Result.isInvalid())
     return QualType();
@@ -2595,7 +2595,7 @@
   return Composite2;
 }
 
-Sema::OwningExprResult Sema::MaybeBindToTemporary(Expr *E) {
+ExprResult Sema::MaybeBindToTemporary(Expr *E) {
   if (!Context.getLangOptions().CPlusPlus)
     return Owned(E);
 
@@ -2655,8 +2655,8 @@
   return E;
 }
 
-Sema::OwningExprResult 
-Sema::MaybeCreateCXXExprWithTemporaries(OwningExprResult SubExpr) {
+ExprResult 
+Sema::MaybeCreateCXXExprWithTemporaries(ExprResult SubExpr) {
   if (SubExpr.isInvalid())
     return ExprError();
   
@@ -2679,12 +2679,12 @@
   return E;
 }
 
-Sema::OwningExprResult
+ExprResult
 Sema::ActOnStartCXXMemberReference(Scope *S, Expr *Base, SourceLocation OpLoc,
                                    tok::TokenKind OpKind, ParsedType &ObjectType,
                                    bool &MayBePseudoDestructor) {
   // Since this might be a postfix expression, get rid of ParenListExprs.
-  OwningExprResult Result = MaybeConvertParenListExprToParenExpr(S, Base);
+  ExprResult Result = MaybeConvertParenListExprToParenExpr(S, Base);
   if (Result.isInvalid()) return ExprError();
   Base = Result.get();
 
@@ -2764,7 +2764,7 @@
   return move(Base);
 }
 
-Sema::OwningExprResult Sema::DiagnoseDtorReference(SourceLocation NameLoc,
+ExprResult Sema::DiagnoseDtorReference(SourceLocation NameLoc,
                                                    Expr *MemExpr) {
   SourceLocation ExpectedLParenLoc = PP.getLocForEndOfToken(NameLoc);
   Diag(MemExpr->getLocStart(), diag::err_dtor_expr_without_call)
@@ -2779,7 +2779,7 @@
                        /*RPLoc*/ ExpectedLParenLoc);
 }
 
-Sema::OwningExprResult Sema::BuildPseudoDestructorExpr(Expr *Base,
+ExprResult Sema::BuildPseudoDestructorExpr(Expr *Base,
                                                        SourceLocation OpLoc,
                                                        tok::TokenKind OpKind,
                                                        const CXXScopeSpec &SS,
@@ -2874,7 +2874,7 @@
   return DiagnoseDtorReference(Destructed.getLocation(), Result);
 }
 
-Sema::OwningExprResult Sema::ActOnPseudoDestructorExpr(Scope *S, Expr *Base,
+ExprResult Sema::ActOnPseudoDestructorExpr(Scope *S, Expr *Base,
                                                        SourceLocation OpLoc,
                                                        tok::TokenKind OpKind,
                                                        CXXScopeSpec &SS,
@@ -3044,7 +3044,7 @@
   return CE;
 }
 
-Sema::OwningExprResult Sema::ActOnFinishFullExpr(Expr *FullExpr) {
+ExprResult Sema::ActOnFinishFullExpr(Expr *FullExpr) {
   if (!FullExpr) return ExprError();
   return MaybeCreateCXXExprWithTemporaries(FullExpr);
 }

Modified: cfe/trunk/lib/Sema/SemaExprObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprObjC.cpp?rev=111903&r1=111902&r2=111903&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprObjC.cpp Tue Aug 24 01:29:42 2010
@@ -241,7 +241,7 @@
       return true;
 
     InitializedEntity Entity = InitializedEntity::InitializeParameter(Param);
-    OwningExprResult ArgE = PerformCopyInitialization(Entity,
+    ExprResult ArgE = PerformCopyInitialization(Entity,
                                                       SourceLocation(),
                                                       Owned(argExpr->Retain()));
     if (ArgE.isInvalid())
@@ -331,7 +331,7 @@
 
 /// HandleExprPropertyRefExpr - Handle foo.bar where foo is a pointer to an
 /// objective C interface.  This is a property reference expression.
-Action::OwningExprResult Sema::
+ExprResult Sema::
 HandleExprPropertyRefExpr(const ObjCObjectPointerType *OPT,
                           Expr *BaseExpr, DeclarationName MemberName,
                           SourceLocation MemberLoc) {
@@ -433,7 +433,7 @@
 
 
 
-Action::OwningExprResult Sema::
+ExprResult Sema::
 ActOnClassPropertyRefExpr(IdentifierInfo &receiverName,
                           IdentifierInfo &propertyName,
                           SourceLocation receiverNameLoc,
@@ -624,7 +624,7 @@
   return ObjCInstanceMessage;
 }
 
-Sema::OwningExprResult Sema::ActOnSuperMessage(Scope *S, 
+ExprResult Sema::ActOnSuperMessage(Scope *S, 
                                                SourceLocation SuperLoc,
                                                Selector Sel,
                                                SourceLocation LBracLoc,
@@ -700,7 +700,7 @@
 /// \param RBrac The location of the closing square bracket ']'.
 ///
 /// \param Args The message arguments.
-Sema::OwningExprResult Sema::BuildClassMessage(TypeSourceInfo *ReceiverTypeInfo,
+ExprResult Sema::BuildClassMessage(TypeSourceInfo *ReceiverTypeInfo,
                                                QualType ReceiverType,
                                                SourceLocation SuperLoc,
                                                Selector Sel,
@@ -779,7 +779,7 @@
 // ActOnClassMessage - used for both unary and keyword messages.
 // ArgExprs is optional - if it is present, the number of expressions
 // is obtained from Sel.getNumArgs().
-Sema::OwningExprResult Sema::ActOnClassMessage(Scope *S, 
+ExprResult Sema::ActOnClassMessage(Scope *S, 
                                                ParsedType Receiver,
                                                Selector Sel,
                                                SourceLocation LBracLoc,
@@ -828,7 +828,7 @@
 /// \param RBrac The location of the closing square bracket ']'.
 ///
 /// \param Args The message arguments.
-Sema::OwningExprResult Sema::BuildInstanceMessage(Expr *Receiver,
+ExprResult Sema::BuildInstanceMessage(Expr *Receiver,
                                                   QualType ReceiverType,
                                                   SourceLocation SuperLoc,
                                                   Selector Sel,
@@ -1032,13 +1032,13 @@
 // ActOnInstanceMessage - used for both unary and keyword messages.
 // ArgExprs is optional - if it is present, the number of expressions
 // is obtained from Sel.getNumArgs().
-Sema::OwningExprResult Sema::ActOnInstanceMessage(Scope *S,
-                                                  Expr *Receiver, 
-                                                  Selector Sel,
-                                                  SourceLocation LBracLoc,
-                                                  SourceLocation SelectorLoc,
-                                                  SourceLocation RBracLoc,
-                                                  MultiExprArg Args) {
+ExprResult Sema::ActOnInstanceMessage(Scope *S,
+                                      Expr *Receiver, 
+                                      Selector Sel,
+                                      SourceLocation LBracLoc,
+                                      SourceLocation SelectorLoc,
+                                      SourceLocation RBracLoc,
+                                      MultiExprArg Args) {
   if (!Receiver)
     return ExprError();
 

Modified: cfe/trunk/lib/Sema/SemaInit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaInit.cpp?rev=111903&r1=111902&r2=111903&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaInit.cpp (original)
+++ cfe/trunk/lib/Sema/SemaInit.cpp Tue Aug 24 01:29:42 2010
@@ -263,7 +263,7 @@
       return;
     }
     
-    Sema::OwningExprResult MemberInit
+    ExprResult MemberInit
       = InitSeq.Perform(SemaRef, MemberEntity, Kind, 
                         Sema::MultiExprArg(SemaRef, 0, 0));
     if (MemberInit.isInvalid()) {
@@ -373,7 +373,7 @@
         return;
       }
 
-      Sema::OwningExprResult ElementInit
+      ExprResult ElementInit
         = InitSeq.Perform(SemaRef, ElementEntity, Kind, 
                           Sema::MultiExprArg(SemaRef, 0, 0));
       if (ElementInit.isInvalid()) {
@@ -678,7 +678,7 @@
       InitializationSequence Seq(SemaRef, Entity, Kind, &expr, 1);
       
       if (Seq) {
-        Sema::OwningExprResult Result = 
+        ExprResult Result = 
           Seq.Perform(SemaRef, Entity, Kind,
                       Sema::MultiExprArg(SemaRef, &expr, 1));
         if (Result.isInvalid())
@@ -758,7 +758,7 @@
       return;
     }
 
-    Sema::OwningExprResult Result =
+    ExprResult Result =
       SemaRef.PerformCopyInitialization(Entity, expr->getLocStart(),
                                         SemaRef.Owned(expr));
 
@@ -805,7 +805,7 @@
       return;
     }
 
-    Sema::OwningExprResult Result =
+    ExprResult Result =
       SemaRef.PerformCopyInitialization(Entity, expr->getLocStart(),
                                         SemaRef.Owned(expr));
 
@@ -1813,10 +1813,10 @@
   return false;
 }
 
-Sema::OwningExprResult Sema::ActOnDesignatedInitializer(Designation &Desig,
+ExprResult Sema::ActOnDesignatedInitializer(Designation &Desig,
                                                         SourceLocation Loc,
                                                         bool GNUSyntax,
-                                                        OwningExprResult Init) {
+                                                        ExprResult Init) {
   typedef DesignatedInitExpr::Designator ASTDesignator;
 
   bool Invalid = false;
@@ -3298,10 +3298,10 @@
 /// \returns An expression that copies the initializer expression into
 /// a temporary object, or an error expression if a copy could not be
 /// created.
-static Sema::OwningExprResult CopyObject(Sema &S,
+static ExprResult CopyObject(Sema &S,
                                          QualType T,
                                          const InitializedEntity &Entity,
-                                         Sema::OwningExprResult CurInit,
+                                         ExprResult CurInit,
                                          bool IsExtraneousCopy) {
   // Determine which class type we're copying to.
   Expr *CurInitExpr = (Expr *)CurInit.get();
@@ -3475,7 +3475,7 @@
   }
 }
 
-Action::OwningExprResult 
+ExprResult 
 InitializationSequence::Perform(Sema &S,
                                 const InitializedEntity &Entity,
                                 const InitializationKind &Kind,
@@ -3528,7 +3528,7 @@
     }
 
     if (Kind.getKind() == InitializationKind::IK_Copy || Kind.isExplicitCast())
-      return Sema::OwningExprResult(Args.release()[0]);
+      return ExprResult(Args.release()[0]);
 
     if (Args.size() == 0)
       return S.Owned((Expr *)0);
@@ -3552,7 +3552,7 @@
     *ResultType = Entity.getDecl() ? Entity.getDecl()->getType() :
                                      Entity.getType();
 
-  Sema::OwningExprResult CurInit = S.Owned((Expr *)0);
+  ExprResult CurInit = S.Owned((Expr *)0);
   
   assert(!Steps.empty() && "Cannot have an empty initialization sequence");
   
@@ -3577,7 +3577,7 @@
   case SK_StringInit:
   case SK_ObjCObjectConversion:
     assert(Args.size() == 1);
-    CurInit = Sema::OwningExprResult(((Expr **)(Args.get()))[0]->Retain());
+    CurInit = ExprResult(((Expr **)(Args.get()))[0]->Retain());
     if (CurInit.isInvalid())
       return S.ExprError();
     break;
@@ -4454,10 +4454,10 @@
 //===----------------------------------------------------------------------===//
 // Initialization helper functions
 //===----------------------------------------------------------------------===//
-Sema::OwningExprResult 
+ExprResult 
 Sema::PerformCopyInitialization(const InitializedEntity &Entity,
                                 SourceLocation EqualLoc,
-                                OwningExprResult Init) {
+                                ExprResult Init) {
   if (Init.isInvalid())
     return ExprError();
 

Modified: cfe/trunk/lib/Sema/SemaObjCProperty.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaObjCProperty.cpp?rev=111903&r1=111902&r2=111903&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaObjCProperty.cpp (original)
+++ cfe/trunk/lib/Sema/SemaObjCProperty.cpp Tue Aug 24 01:29:42 2010
@@ -464,7 +464,7 @@
       Expr *IvarRefExpr =
         new (Context) ObjCIvarRefExpr(Ivar, Ivar->getType(), AtLoc,
                                       SelfExpr, true, true);
-      OwningExprResult Res = 
+      ExprResult Res = 
         PerformCopyInitialization(InitializedEntity::InitializeResult(
                                     SourceLocation(),
                                     getterMethod->getResultType(),
@@ -494,8 +494,8 @@
       ParmVarDecl *Param = (*P);
       Expr *rhs = new (Context) DeclRefExpr(Param,Param->getType(),
                                             SourceLocation());
-      OwningExprResult Res = BuildBinOp(S, SourceLocation(), 
-                                        BinaryOperator::Assign, lhs, rhs);
+      ExprResult Res = BuildBinOp(S, SourceLocation(), 
+                                  BinaryOperator::Assign, lhs, rhs);
       PIDecl->setSetterCXXAssignment(Res.takeAs<Expr>());
     }
   }

Modified: cfe/trunk/lib/Sema/SemaOverload.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOverload.cpp?rev=111903&r1=111902&r2=111903&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaOverload.cpp (original)
+++ cfe/trunk/lib/Sema/SemaOverload.cpp Tue Aug 24 01:29:42 2010
@@ -3191,7 +3191,7 @@
 ///
 /// \returns The expression, converted to an integral or enumeration type if
 /// successful.
-Sema::OwningExprResult 
+ExprResult 
 Sema::ConvertToIntegralOrEnumerationType(SourceLocation Loc, Expr *From,
                                          const PartialDiagnostic &NotIntDiag,
                                        const PartialDiagnostic &IncompleteDiag,
@@ -6505,7 +6505,7 @@
 /// Attempts to recover from a call where no functions were found.
 ///
 /// Returns true if new candidates were found.
-static Sema::OwningExprResult
+static ExprResult
 BuildRecoveryCallExpr(Sema &SemaRef, Scope *S, Expr *Fn,
                       UnresolvedLookupExpr *ULE,
                       SourceLocation LParenLoc,
@@ -6535,7 +6535,7 @@
 
   // Build an implicit member call if appropriate.  Just drop the
   // casts and such from the call, we don't really care.
-  Sema::OwningExprResult NewFn = SemaRef.ExprError();
+  ExprResult NewFn = SemaRef.ExprError();
   if ((*R.begin())->isCXXClassMember())
     NewFn = SemaRef.BuildPossibleImplicitMemberExpr(SS, R, ExplicitTemplateArgs);
   else if (ExplicitTemplateArgs)
@@ -6561,7 +6561,7 @@
 /// the function declaration produced by overload
 /// resolution. Otherwise, emits diagnostics, deletes all of the
 /// arguments and Fn, and returns NULL.
-Sema::OwningExprResult
+ExprResult
 Sema::BuildOverloadedCallExpr(Scope *S, Expr *Fn, UnresolvedLookupExpr *ULE,
                               SourceLocation LParenLoc,
                               Expr **Args, unsigned NumArgs,
@@ -6655,7 +6655,7 @@
 /// by CreateOverloadedUnaryOp().
 ///
 /// \param input The input argument.
-Sema::OwningExprResult
+ExprResult
 Sema::CreateOverloadedUnaryOp(SourceLocation OpLoc, unsigned OpcIn,
                               const UnresolvedSetImpl &Fns,
                               Expr *Input) {
@@ -6737,7 +6737,7 @@
           return ExprError();
       } else {
         // Convert the arguments.
-        OwningExprResult InputInit
+        ExprResult InputInit
           = PerformCopyInitialization(InitializedEntity::InitializeParameter(
                                                       FnDecl->getParamDecl(0)),
                                       SourceLocation(), 
@@ -6824,7 +6824,7 @@
 ///
 /// \param LHS Left-hand argument.
 /// \param RHS Right-hand argument.
-Sema::OwningExprResult
+ExprResult
 Sema::CreateOverloadedBinOp(SourceLocation OpLoc,
                             unsigned OpcIn,
                             const UnresolvedSetImpl &Fns,
@@ -6916,7 +6916,7 @@
           // Best->Access is only meaningful for class members.
           CheckMemberOperatorAccess(OpLoc, Args[0], Args[1], Best->FoundDecl);
 
-          OwningExprResult Arg1
+          ExprResult Arg1
             = PerformCopyInitialization(
                                         InitializedEntity::InitializeParameter(
                                                         FnDecl->getParamDecl(0)),
@@ -6932,7 +6932,7 @@
           Args[1] = RHS = Arg1.takeAs<Expr>();
         } else {
           // Convert the arguments.
-          OwningExprResult Arg0
+          ExprResult Arg0
             = PerformCopyInitialization(
                                         InitializedEntity::InitializeParameter(
                                                         FnDecl->getParamDecl(0)),
@@ -6941,7 +6941,7 @@
           if (Arg0.isInvalid())
             return ExprError();
 
-          OwningExprResult Arg1
+          ExprResult Arg1
             = PerformCopyInitialization(
                                         InitializedEntity::InitializeParameter(
                                                         FnDecl->getParamDecl(1)),
@@ -6999,7 +6999,7 @@
       // For class as left operand for assignment or compound assigment operator
       // do not fall through to handling in built-in, but report that no overloaded
       // assignment operator found
-      OwningExprResult Result = ExprError();
+      ExprResult Result = ExprError();
       if (Args[0]->getType()->isRecordType() && 
           Opc >= BinaryOperator::Assign && Opc <= BinaryOperator::OrAssign) {
         Diag(OpLoc,  diag::err_ovl_no_viable_oper)
@@ -7039,7 +7039,7 @@
   return CreateBuiltinBinOp(OpLoc, Opc, Args[0], Args[1]);
 }
 
-Action::OwningExprResult
+ExprResult
 Sema::CreateOverloadedArraySubscriptExpr(SourceLocation LLoc,
                                          SourceLocation RLoc,
                                          Expr *Base, Expr *Idx) {
@@ -7101,7 +7101,7 @@
           return ExprError();
 
         // Convert the arguments.
-        OwningExprResult InputInit
+        ExprResult InputInit
           = PerformCopyInitialization(InitializedEntity::InitializeParameter(
                                                       FnDecl->getParamDecl(0)),
                                       SourceLocation(), 
@@ -7186,7 +7186,7 @@
 /// parameter). The caller needs to validate that the member
 /// expression refers to a member function or an overloaded member
 /// function.
-Sema::OwningExprResult
+ExprResult
 Sema::BuildCallToMemberFunction(Scope *S, Expr *MemExprE,
                                 SourceLocation LParenLoc, Expr **Args,
                                 unsigned NumArgs, SourceLocation *CommaLocs,
@@ -7539,7 +7539,7 @@
 
       // Pass the argument.
 
-      OwningExprResult InputInit
+      ExprResult InputInit
         = PerformCopyInitialization(InitializedEntity::InitializeParameter(
                                                     Method->getParamDecl(i)),
                                     SourceLocation(), Arg);
@@ -7547,7 +7547,7 @@
       IsError |= InputInit.isInvalid();
       Arg = InputInit.takeAs<Expr>();
     } else {
-      OwningExprResult DefArg
+      ExprResult DefArg
         = BuildCXXDefaultArgExpr(LParenLoc, Method, Method->getParamDecl(i));
       if (DefArg.isInvalid()) {
         IsError = true;
@@ -7581,7 +7581,7 @@
 /// BuildOverloadedArrowExpr - Build a call to an overloaded @c operator->
 ///  (if one exists), where @c Base is an expression of class type and
 /// @c Member is the name of the member we're trying to find.
-Sema::OwningExprResult
+ExprResult
 Sema::BuildOverloadedArrowExpr(Scope *S, Expr *Base, SourceLocation OpLoc) {
   assert(Base->getType()->isRecordType() && "left-hand side must have class type");
 
@@ -7806,9 +7806,9 @@
   return E->Retain();
 }
 
-Sema::OwningExprResult Sema::FixOverloadedFunctionReference(OwningExprResult E, 
-                                                          DeclAccessPair Found,
-                                                            FunctionDecl *Fn) {
+ExprResult Sema::FixOverloadedFunctionReference(ExprResult E, 
+                                                DeclAccessPair Found,
+                                                FunctionDecl *Fn) {
   return Owned(FixOverloadedFunctionReference((Expr *)E.get(), Found, Fn));
 }
 

Modified: cfe/trunk/lib/Sema/SemaStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaStmt.cpp?rev=111903&r1=111902&r2=111903&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaStmt.cpp (original)
+++ cfe/trunk/lib/Sema/SemaStmt.cpp Tue Aug 24 01:29:42 2010
@@ -27,7 +27,7 @@
 #include "llvm/ADT/SmallVector.h"
 using namespace clang;
 
-Sema::OwningStmtResult Sema::ActOnExprStmt(FullExprArg expr) {
+StmtResult Sema::ActOnExprStmt(FullExprArg expr) {
   Expr *E = expr.get();
   assert(E && "ActOnExprStmt(): missing expression");
   // C99 6.8.3p2: The expression in an expression statement is evaluated as a
@@ -39,11 +39,11 @@
 }
 
 
-Sema::OwningStmtResult Sema::ActOnNullStmt(SourceLocation SemiLoc) {
+StmtResult Sema::ActOnNullStmt(SourceLocation SemiLoc) {
   return Owned(new (Context) NullStmt(SemiLoc));
 }
 
-Sema::OwningStmtResult Sema::ActOnDeclStmt(DeclGroupPtrTy dg,
+StmtResult Sema::ActOnDeclStmt(DeclGroupPtrTy dg,
                                            SourceLocation StartLoc,
                                            SourceLocation EndLoc) {
   DeclGroupRef DG = dg.getAsVal<DeclGroupRef>();
@@ -135,7 +135,7 @@
   DiagRuntimeBehavior(Loc, PDiag(DiagID) << R1 << R2);
 }
 
-Action::OwningStmtResult
+StmtResult
 Sema::ActOnCompoundStmt(SourceLocation L, SourceLocation R,
                         MultiStmtArg elts, bool isStmtExpr) {
   unsigned NumElts = elts.size();
@@ -170,7 +170,7 @@
   return Owned(new (Context) CompoundStmt(Context, Elts, NumElts, L, R));
 }
 
-Action::OwningStmtResult
+StmtResult
 Sema::ActOnCaseStmt(SourceLocation CaseLoc, Expr *LHSVal,
                     SourceLocation DotDotDotLoc, Expr *RHSVal,
                     SourceLocation ColonLoc) {
@@ -206,7 +206,7 @@
   CS->setSubStmt(SubStmt);
 }
 
-Action::OwningStmtResult
+StmtResult
 Sema::ActOnDefaultStmt(SourceLocation DefaultLoc, SourceLocation ColonLoc,
                        Stmt *SubStmt, Scope *CurScope) {
   if (getSwitchStack().empty()) {
@@ -219,7 +219,7 @@
   return Owned(DS);
 }
 
-Action::OwningStmtResult
+StmtResult
 Sema::ActOnLabelStmt(SourceLocation IdentLoc, IdentifierInfo *II,
                      SourceLocation ColonLoc, Stmt *SubStmt) {
   // Look up the record for this label identifier.
@@ -246,11 +246,11 @@
   return Owned(LabelDecl);
 }
 
-Action::OwningStmtResult
+StmtResult
 Sema::ActOnIfStmt(SourceLocation IfLoc, FullExprArg CondVal, Decl *CondVar,
                   Stmt *thenStmt, SourceLocation ElseLoc,
                   Stmt *elseStmt) {
-  OwningExprResult CondResult(CondVal.release());
+  ExprResult CondResult(CondVal.release());
 
   VarDecl *ConditionVar = 0;
   if (CondVar) {
@@ -382,10 +382,10 @@
   return expr->getType();
 }
 
-Action::OwningStmtResult
+StmtResult
 Sema::ActOnStartOfSwitchStmt(SourceLocation SwitchLoc, Expr *Cond, 
                              Decl *CondVar) {
-  OwningExprResult CondResult;
+  ExprResult CondResult;
 
   VarDecl *ConditionVar = 0;
   if (CondVar) {
@@ -427,7 +427,7 @@
   return Owned(SS);
 }
 
-Action::OwningStmtResult
+StmtResult
 Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc, Stmt *Switch,
                             Stmt *BodyStmt) {
   SwitchStmt *SS = cast<SwitchStmt>(Switch);
@@ -783,10 +783,10 @@
   return Owned(SS);
 }
 
-Action::OwningStmtResult
+StmtResult
 Sema::ActOnWhileStmt(SourceLocation WhileLoc, FullExprArg Cond, 
                      Decl *CondVar, Stmt *Body) {
-  OwningExprResult CondResult(Cond.release());
+  ExprResult CondResult(Cond.release());
   
   VarDecl *ConditionVar = 0;
   if (CondVar) {
@@ -805,7 +805,7 @@
                                        Body, WhileLoc));
 }
 
-Action::OwningStmtResult
+StmtResult
 Sema::ActOnDoStmt(SourceLocation DoLoc, Stmt *Body,
                   SourceLocation WhileLoc, SourceLocation CondLParen,
                   Expr *Cond, SourceLocation CondRParen) {
@@ -814,7 +814,7 @@
   if (CheckBooleanCondition(Cond, DoLoc))
     return StmtError();
 
-  OwningExprResult CondResult = MaybeCreateCXXExprWithTemporaries(Cond);
+  ExprResult CondResult = MaybeCreateCXXExprWithTemporaries(Cond);
   if (CondResult.isInvalid())
     return StmtError();
   Cond = CondResult.take();
@@ -824,7 +824,7 @@
   return Owned(new (Context) DoStmt(Body, Cond, DoLoc, WhileLoc, CondRParen));
 }
 
-Action::OwningStmtResult
+StmtResult
 Sema::ActOnForStmt(SourceLocation ForLoc, SourceLocation LParenLoc,
                    Stmt *First, FullExprArg second, Decl *secondVar,
                    FullExprArg third,
@@ -846,7 +846,7 @@
     }
   }
 
-  OwningExprResult SecondResult(second.release());
+  ExprResult SecondResult(second.release());
   VarDecl *ConditionVar = 0;
   if (secondVar) {
     ConditionVar = cast<VarDecl>(secondVar);
@@ -867,7 +867,7 @@
                                      RParenLoc));
 }
 
-Action::OwningStmtResult
+StmtResult
 Sema::ActOnObjCForCollectionStmt(SourceLocation ForLoc,
                                  SourceLocation LParenLoc,
                                  Stmt *First, Expr *Second,
@@ -936,7 +936,7 @@
                                                    ForLoc, RParenLoc));
 }
 
-Action::OwningStmtResult
+StmtResult
 Sema::ActOnGotoStmt(SourceLocation GotoLoc, SourceLocation LabelLoc,
                     IdentifierInfo *LabelII) {
   // Look up the record for this label identifier.
@@ -951,7 +951,7 @@
   return Owned(new (Context) GotoStmt(LabelDecl, GotoLoc, LabelLoc));
 }
 
-Action::OwningStmtResult
+StmtResult
 Sema::ActOnIndirectGotoStmt(SourceLocation GotoLoc, SourceLocation StarLoc,
                             Expr *E) {
   // Convert operand to void*
@@ -969,7 +969,7 @@
   return Owned(new (Context) IndirectGotoStmt(GotoLoc, StarLoc, E));
 }
 
-Action::OwningStmtResult
+StmtResult
 Sema::ActOnContinueStmt(SourceLocation ContinueLoc, Scope *CurScope) {
   Scope *S = CurScope->getContinueParent();
   if (!S) {
@@ -980,7 +980,7 @@
   return Owned(new (Context) ContinueStmt(ContinueLoc));
 }
 
-Action::OwningStmtResult
+StmtResult
 Sema::ActOnBreakStmt(SourceLocation BreakLoc, Scope *CurScope) {
   Scope *S = CurScope->getBreakParent();
   if (!S) {
@@ -1032,7 +1032,7 @@
 
 /// ActOnBlockReturnStmt - Utility routine to figure out block's return type.
 ///
-Action::OwningStmtResult
+StmtResult
 Sema::ActOnBlockReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp) {
   // If this is the first return we've seen in the block, infer the type of
   // the block from it.
@@ -1086,7 +1086,7 @@
       // In C++ the return statement is handled via a copy initialization.
       // the C version of which boils down to CheckSingleAssignmentConstraints.
       NRVOCandidate = getNRVOCandidate(Context, FnRetType, RetValExp);
-      OwningExprResult Res = PerformCopyInitialization(
+      ExprResult Res = PerformCopyInitialization(
                                InitializedEntity::InitializeResult(ReturnLoc, 
                                                                    FnRetType,
                                                             NRVOCandidate != 0),
@@ -1117,7 +1117,7 @@
   return Owned(Result);
 }
 
-Action::OwningStmtResult
+StmtResult
 Sema::ActOnReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp) {
   if (getCurBlock())
     return ActOnBlockReturnStmt(ReturnLoc, RetValExp);
@@ -1177,7 +1177,7 @@
       // In C++ the return statement is handled via a copy initialization.
       // the C version of which boils down to CheckSingleAssignmentConstraints.
       NRVOCandidate = getNRVOCandidate(Context, FnRetType, RetValExp);
-      OwningExprResult Res = PerformCopyInitialization(
+      ExprResult Res = PerformCopyInitialization(
                                InitializedEntity::InitializeResult(ReturnLoc, 
                                                                    FnRetType,
                                                             NRVOCandidate != 0),
@@ -1241,7 +1241,7 @@
 }
 
 
-Sema::OwningStmtResult Sema::ActOnAsmStmt(SourceLocation AsmLoc,
+StmtResult Sema::ActOnAsmStmt(SourceLocation AsmLoc,
                                           bool IsSimple,
                                           bool IsVolatile,
                                           unsigned NumOutputs,
@@ -1462,7 +1462,7 @@
   return Owned(NS);
 }
 
-Action::OwningStmtResult
+StmtResult
 Sema::ActOnObjCAtCatchStmt(SourceLocation AtLoc,
                            SourceLocation RParen, Decl *Parm,
                            Stmt *Body) {
@@ -1473,12 +1473,12 @@
   return Owned(new (Context) ObjCAtCatchStmt(AtLoc, RParen, Var, Body));
 }
 
-Action::OwningStmtResult
+StmtResult
 Sema::ActOnObjCAtFinallyStmt(SourceLocation AtLoc, Stmt *Body) {
   return Owned(new (Context) ObjCAtFinallyStmt(AtLoc, Body));
 }
 
-Action::OwningStmtResult
+StmtResult
 Sema::ActOnObjCAtTryStmt(SourceLocation AtLoc, Stmt *Try, 
                          MultiStmtArg CatchStmts, Stmt *Finally) {
   setFunctionHasBranchProtectedScope();
@@ -1489,7 +1489,7 @@
                                      Finally));
 }
 
-Sema::OwningStmtResult Sema::BuildObjCAtThrowStmt(SourceLocation AtLoc,
+StmtResult Sema::BuildObjCAtThrowStmt(SourceLocation AtLoc,
                                                   Expr *Throw) {
   if (Throw) {
     QualType ThrowType = Throw->getType();
@@ -1506,7 +1506,7 @@
   return Owned(new (Context) ObjCAtThrowStmt(AtLoc, Throw));
 }
 
-Action::OwningStmtResult
+StmtResult
 Sema::ActOnObjCAtThrowStmt(SourceLocation AtLoc, Expr *Throw, 
                            Scope *CurScope) {
   if (!Throw) {
@@ -1522,7 +1522,7 @@
   return BuildObjCAtThrowStmt(AtLoc, Throw);
 }
 
-Action::OwningStmtResult
+StmtResult
 Sema::ActOnObjCAtSynchronizedStmt(SourceLocation AtLoc, Expr *SyncExpr,
                                   Stmt *SyncBody) {
   setFunctionHasBranchProtectedScope();
@@ -1541,7 +1541,7 @@
 
 /// ActOnCXXCatchBlock - Takes an exception declaration and a handler block
 /// and creates a proper catch handler from them.
-Action::OwningStmtResult
+StmtResult
 Sema::ActOnCXXCatchBlock(SourceLocation CatchLoc, Decl *ExDecl,
                          Stmt *HandlerBlock) {
   // There's nothing to test that ActOnExceptionDecl didn't already test.
@@ -1585,7 +1585,7 @@
 
 /// ActOnCXXTryBlock - Takes a try compound-statement and a number of
 /// handlers and creates a try statement from them.
-Action::OwningStmtResult
+StmtResult
 Sema::ActOnCXXTryBlock(SourceLocation TryLoc, Stmt *TryBlock,
                        MultiStmtArg RawHandlers) {
   unsigned NumHandlers = RawHandlers.size();

Modified: cfe/trunk/lib/Sema/SemaTemplate.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplate.cpp?rev=111903&r1=111902&r2=111903&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplate.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplate.cpp Tue Aug 24 01:29:42 2010
@@ -344,7 +344,7 @@
 /// ActOnDependentIdExpression - Handle a dependent id-expression that
 /// was just parsed.  This is only possible with an explicit scope
 /// specifier naming a dependent type.
-Sema::OwningExprResult
+ExprResult
 Sema::ActOnDependentIdExpression(const CXXScopeSpec &SS,
                                  const DeclarationNameInfo &NameInfo,
                                  bool isAddressOfOperand,
@@ -376,7 +376,7 @@
   return BuildDependentDeclRefExpr(SS, NameInfo, TemplateArgs);
 }
 
-Sema::OwningExprResult
+ExprResult
 Sema::BuildDependentDeclRefExpr(const CXXScopeSpec &SS,
                                 const DeclarationNameInfo &NameInfo,
                                 const TemplateArgumentListInfo *TemplateArgs) {
@@ -1578,7 +1578,7 @@
   return ParsedType::make(ElabType);
 }
 
-Sema::OwningExprResult Sema::BuildTemplateIdExpr(const CXXScopeSpec &SS,
+ExprResult Sema::BuildTemplateIdExpr(const CXXScopeSpec &SS,
                                                  LookupResult &R,
                                                  bool RequiresADL,
                                  const TemplateArgumentListInfo &TemplateArgs) {
@@ -1615,7 +1615,7 @@
 }
 
 // We actually only call this from template instantiation.
-Sema::OwningExprResult
+ExprResult
 Sema::BuildQualifiedTemplateIdExpr(CXXScopeSpec &SS,
                                    const DeclarationNameInfo &NameInfo,
                              const TemplateArgumentListInfo &TemplateArgs) {
@@ -1860,7 +1860,7 @@
 /// parameters that precede \p Param in the template parameter list.
 ///
 /// \returns the substituted template argument, or NULL if an error occurred.
-static Sema::OwningExprResult
+static ExprResult
 SubstDefaultTemplateArgument(Sema &SemaRef,
                              TemplateDecl *Template,
                              SourceLocation TemplateLoc,
@@ -1956,7 +1956,7 @@
     if (!NonTypeParm->hasDefaultArgument())
       return TemplateArgumentLoc();
 
-    OwningExprResult Arg = SubstDefaultTemplateArgument(*this, Template,
+    ExprResult Arg = SubstDefaultTemplateArgument(*this, Template,
                                                         TemplateLoc,
                                                         RAngleLoc,
                                                         NonTypeParm,
@@ -2279,7 +2279,7 @@
         break;
       }
 
-      Sema::OwningExprResult E = SubstDefaultTemplateArgument(*this, Template,
+      ExprResult E = SubstDefaultTemplateArgument(*this, Template,
                                                               TemplateLoc, 
                                                               RAngleLoc, 
                                                               NTTP, 
@@ -3038,7 +3038,7 @@
 /// declaration and the type of its corresponding non-type template
 /// parameter, produce an expression that properly refers to that
 /// declaration.
-Sema::OwningExprResult 
+ExprResult 
 Sema::BuildExpressionFromDeclTemplateArgument(const TemplateArgument &Arg,
                                               QualType ParamType,
                                               SourceLocation Loc) {
@@ -3061,7 +3061,7 @@
                                       ClassType.getTypePtr());
       CXXScopeSpec SS;
       SS.setScopeRep(Qualifier);
-      OwningExprResult RefExpr = BuildDeclRefExpr(VD, 
+      ExprResult RefExpr = BuildDeclRefExpr(VD, 
                                            VD->getType().getNonReferenceType(), 
                                                   Loc,
                                                   &SS);
@@ -3092,7 +3092,7 @@
   if (ParamType->isPointerType()) {
     // When the non-type template parameter is a pointer, take the
     // address of the declaration.
-    OwningExprResult RefExpr = BuildDeclRefExpr(VD, T, Loc);
+    ExprResult RefExpr = BuildDeclRefExpr(VD, T, Loc);
     if (RefExpr.isInvalid())
       return ExprError();
 
@@ -3128,7 +3128,7 @@
 /// This routine takes care of the mapping from an integral template
 /// argument (which may have any integral type) to the appropriate
 /// literal value.
-Sema::OwningExprResult 
+ExprResult 
 Sema::BuildExpressionFromIntegralTemplateArgument(const TemplateArgument &Arg,
                                                   SourceLocation Loc) {
   assert(Arg.getKind() == TemplateArgument::Integral &&
@@ -5485,7 +5485,7 @@
   return Rebuilder.TransformType(T);
 }
 
-OwningExprResult Sema::RebuildExprInCurrentInstantiation(Expr *E) {
+ExprResult Sema::RebuildExprInCurrentInstantiation(Expr *E) {
   CurrentInstantiationRebuilder Rebuilder(*this, E->getExprLoc(),
                                           DeclarationName());
   return Rebuilder.TransformExpr(E);

Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp?rev=111903&r1=111902&r2=111903&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp Tue Aug 24 01:29:42 2010
@@ -614,10 +614,10 @@
     QualType RebuildElaboratedType(ElaboratedTypeKeyword Keyword,
                                    NestedNameSpecifier *NNS, QualType T);
 
-    Sema::OwningExprResult TransformPredefinedExpr(PredefinedExpr *E);
-    Sema::OwningExprResult TransformDeclRefExpr(DeclRefExpr *E);
-    Sema::OwningExprResult TransformCXXDefaultArgExpr(CXXDefaultArgExpr *E);
-    Sema::OwningExprResult TransformTemplateParmRefExpr(DeclRefExpr *E,
+    ExprResult TransformPredefinedExpr(PredefinedExpr *E);
+    ExprResult TransformDeclRefExpr(DeclRefExpr *E);
+    ExprResult TransformCXXDefaultArgExpr(CXXDefaultArgExpr *E);
+    ExprResult TransformTemplateParmRefExpr(DeclRefExpr *E,
                                                 NonTypeTemplateParmDecl *D);
 
     QualType TransformFunctionProtoType(TypeLocBuilder &TLB,
@@ -631,9 +631,9 @@
                                            TemplateTypeParmTypeLoc TL,
                                            QualType ObjectType);
 
-    Sema::OwningExprResult TransformCallExpr(CallExpr *CE) {
+    ExprResult TransformCallExpr(CallExpr *CE) {
       getSema().CallsUndergoingInstantiation.push_back(CE);
-      OwningExprResult Result =
+      ExprResult Result =
           TreeTransform<TemplateInstantiator>::TransformCallExpr(CE);
       getSema().CallsUndergoingInstantiation.pop_back();
       return move(Result);
@@ -768,7 +768,7 @@
                                                                     NNS, T);
 }
 
-Sema::OwningExprResult 
+ExprResult 
 TemplateInstantiator::TransformPredefinedExpr(PredefinedExpr *E) {
   if (!E->isTypeDependent())
     return SemaRef.Owned(E->Retain());
@@ -790,7 +790,7 @@
   return getSema().Owned(PE);
 }
 
-Sema::OwningExprResult
+ExprResult
 TemplateInstantiator::TransformTemplateParmRefExpr(DeclRefExpr *E,
                                                NonTypeTemplateParmDecl *NTTP) {
   // If the corresponding template argument is NULL or non-existent, it's
@@ -837,7 +837,7 @@
 }
                                                    
 
-Sema::OwningExprResult
+ExprResult
 TemplateInstantiator::TransformDeclRefExpr(DeclRefExpr *E) {
   NamedDecl *D = E->getDecl();
   if (NonTypeTemplateParmDecl *NTTP = dyn_cast<NonTypeTemplateParmDecl>(D)) {
@@ -851,7 +851,7 @@
   return TreeTransform<TemplateInstantiator>::TransformDeclRefExpr(E);
 }
 
-Sema::OwningExprResult TemplateInstantiator::TransformCXXDefaultArgExpr(
+ExprResult TemplateInstantiator::TransformCXXDefaultArgExpr(
     CXXDefaultArgExpr *E) {
   assert(!cast<FunctionDecl>(E->getParam()->getDeclContext())->
              getDescribedFunctionTemplate() &&
@@ -1579,7 +1579,7 @@
                           TSK);
 }
 
-Sema::OwningStmtResult
+StmtResult
 Sema::SubstStmt(Stmt *S, const MultiLevelTemplateArgumentList &TemplateArgs) {
   if (!S)
     return Owned(S);
@@ -1590,7 +1590,7 @@
   return Instantiator.TransformStmt(S);
 }
 
-Sema::OwningExprResult
+ExprResult
 Sema::SubstExpr(Expr *E, const MultiLevelTemplateArgumentList &TemplateArgs) {
   if (!E)
     return Owned(E);

Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp?rev=111903&r1=111902&r2=111903&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp Tue Aug 24 01:29:42 2010
@@ -32,8 +32,6 @@
     const MultiLevelTemplateArgumentList &TemplateArgs;
 
   public:
-    typedef Sema::OwningExprResult OwningExprResult;
-
     TemplateDeclInstantiator(Sema &SemaRef, DeclContext *Owner,
                              const MultiLevelTemplateArgumentList &TemplateArgs)
       : SemaRef(SemaRef), Owner(Owner), TemplateArgs(TemplateArgs) { }
@@ -151,7 +149,7 @@
                                                      Action::Unevaluated);
 
         if (Aligned->isAlignmentExpr()) {
-          OwningExprResult Result = SubstExpr(Aligned->getAlignmentExpr(),
+          ExprResult Result = SubstExpr(Aligned->getAlignmentExpr(),
                                               TemplateArgs);
           if (!Result.isInvalid())
             AddAlignedAttr(Aligned->getLocation(), New, Result.takeAs<Expr>());
@@ -260,7 +258,7 @@
     if (Args[I]->isDefaultArgument())
       break;
   
-    Sema::OwningExprResult Arg = SemaRef.SubstExpr(Args[I], TemplateArgs);
+    ExprResult Arg = SemaRef.SubstExpr(Args[I], TemplateArgs);
     if (Arg.isInvalid())
       return true;
   
@@ -335,7 +333,7 @@
     }
   }
  
-  Sema::OwningExprResult Result = S.SubstExpr(Init, TemplateArgs);
+  ExprResult Result = S.SubstExpr(Init, TemplateArgs);
   if (Result.isInvalid())
     return true;
 
@@ -496,7 +494,7 @@
     // The bit-width expression is not potentially evaluated.
     EnterExpressionEvaluationContext Unevaluated(SemaRef, Action::Unevaluated);
 
-    OwningExprResult InstantiatedBitWidth
+    ExprResult InstantiatedBitWidth
       = SemaRef.SubstExpr(BitWidth, TemplateArgs);
     if (InstantiatedBitWidth.isInvalid()) {
       Invalid = true;
@@ -584,12 +582,12 @@
   // The expression in a static assertion is not potentially evaluated.
   EnterExpressionEvaluationContext Unevaluated(SemaRef, Action::Unevaluated);
 
-  OwningExprResult InstantiatedAssertExpr
+  ExprResult InstantiatedAssertExpr
     = SemaRef.SubstExpr(AssertExpr, TemplateArgs);
   if (InstantiatedAssertExpr.isInvalid())
     return 0;
 
-  OwningExprResult Message(D->getMessage());
+  ExprResult Message(D->getMessage());
   D->getMessage()->Retain();
   return SemaRef.ActOnStaticAssertDeclaration(D->getLocation(),
                                               InstantiatedAssertExpr.get(),
@@ -617,7 +615,7 @@
          ECEnd = D->enumerator_end();
        EC != ECEnd; ++EC) {
     // The specified value for the enumerator.
-    OwningExprResult Value = SemaRef.Owned((Expr *)0);
+    ExprResult Value = SemaRef.Owned((Expr *)0);
     if (Expr *UninstValue = EC->getInitExpr()) {
       // The enumerator's value expression is not potentially evaluated.
       EnterExpressionEvaluationContext Unevaluated(SemaRef,
@@ -2106,7 +2104,7 @@
   }
 
   // Instantiate the function body.
-  OwningStmtResult Body = SubstStmt(Pattern, TemplateArgs);
+  StmtResult Body = SubstStmt(Pattern, TemplateArgs);
 
   if (Body.isInvalid())
     Function->setInvalidDecl();

Modified: cfe/trunk/lib/Sema/TreeTransform.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/TreeTransform.h?rev=111903&r1=111902&r2=111903&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/TreeTransform.h (original)
+++ cfe/trunk/lib/Sema/TreeTransform.h Tue Aug 24 01:29:42 2010
@@ -89,8 +89,6 @@
   Sema &SemaRef;
 
 public:
-  typedef Sema::OwningStmtResult OwningStmtResult;
-  typedef Sema::OwningExprResult OwningExprResult;
   typedef Sema::MultiExprArg MultiExprArg;
   typedef Sema::MultiStmtArg MultiStmtArg;
   
@@ -105,8 +103,8 @@
     return static_cast<const Derived&>(*this);
   }
 
-  static inline OwningExprResult Owned(Expr *E) { return E; }
-  static inline OwningStmtResult Owned(Stmt *S) { return S; }
+  static inline ExprResult Owned(Expr *E) { return E; }
+  static inline StmtResult Owned(Stmt *S) { return S; }
 
   /// \brief Retrieves a reference to the semantic analysis object used for
   /// this tree transform.
@@ -220,7 +218,7 @@
   /// other mechanism.
   ///
   /// \returns the transformed statement.
-  OwningStmtResult TransformStmt(Stmt *S);
+  StmtResult TransformStmt(Stmt *S);
 
   /// \brief Transform the given expression.
   ///
@@ -230,7 +228,7 @@
   /// other mechanism.
   ///
   /// \returns the transformed expression.
-  OwningExprResult TransformExpr(Expr *E);
+  ExprResult TransformExpr(Expr *E);
 
   /// \brief Transform the given declaration, which is referenced from a type
   /// or expression.
@@ -337,13 +335,13 @@
   TransformTemplateSpecializationType(const TemplateSpecializationType *T,
                                       QualType ObjectType);
 
-  OwningStmtResult TransformCompoundStmt(CompoundStmt *S, bool IsStmtExpr);
-  OwningExprResult TransformCXXNamedCastExpr(CXXNamedCastExpr *E);
+  StmtResult TransformCompoundStmt(CompoundStmt *S, bool IsStmtExpr);
+  ExprResult TransformCXXNamedCastExpr(CXXNamedCastExpr *E);
 
 #define STMT(Node, Parent)                        \
-  OwningStmtResult Transform##Node(Node *S);
+  StmtResult Transform##Node(Node *S);
 #define EXPR(Node, Parent)                        \
-  OwningExprResult Transform##Node(Node *E);
+  ExprResult Transform##Node(Node *E);
 #define ABSTRACT_STMT(Stmt)
 #include "clang/AST/StmtNodes.inc"
 
@@ -709,7 +707,7 @@
   ///
   /// By default, performs semantic analysis to build the new statement.
   /// Subclasses may override this routine to provide different behavior.
-  OwningStmtResult RebuildCompoundStmt(SourceLocation LBraceLoc,
+  StmtResult RebuildCompoundStmt(SourceLocation LBraceLoc,
                                        MultiStmtArg Statements,
                                        SourceLocation RBraceLoc,
                                        bool IsStmtExpr) {
@@ -721,7 +719,7 @@
   ///
   /// By default, performs semantic analysis to build the new statement.
   /// Subclasses may override this routine to provide different behavior.
-  OwningStmtResult RebuildCaseStmt(SourceLocation CaseLoc,
+  StmtResult RebuildCaseStmt(SourceLocation CaseLoc,
                                    Expr *LHS,
                                    SourceLocation EllipsisLoc,
                                    Expr *RHS,
@@ -734,7 +732,7 @@
   ///
   /// By default, performs semantic analysis to build the new statement.
   /// Subclasses may override this routine to provide different behavior.
-  OwningStmtResult RebuildCaseStmtBody(Stmt *S, Stmt *Body) {
+  StmtResult RebuildCaseStmtBody(Stmt *S, Stmt *Body) {
     getSema().ActOnCaseStmtBody(S, Body);
     return S;
   }
@@ -743,7 +741,7 @@
   ///
   /// By default, performs semantic analysis to build the new statement.
   /// Subclasses may override this routine to provide different behavior.
-  OwningStmtResult RebuildDefaultStmt(SourceLocation DefaultLoc,
+  StmtResult RebuildDefaultStmt(SourceLocation DefaultLoc,
                                       SourceLocation ColonLoc,
                                       Stmt *SubStmt) {
     return getSema().ActOnDefaultStmt(DefaultLoc, ColonLoc, SubStmt,
@@ -754,7 +752,7 @@
   ///
   /// By default, performs semantic analysis to build the new statement.
   /// Subclasses may override this routine to provide different behavior.
-  OwningStmtResult RebuildLabelStmt(SourceLocation IdentLoc,
+  StmtResult RebuildLabelStmt(SourceLocation IdentLoc,
                                     IdentifierInfo *Id,
                                     SourceLocation ColonLoc,
                                     Stmt *SubStmt) {
@@ -765,7 +763,7 @@
   ///
   /// By default, performs semantic analysis to build the new statement.
   /// Subclasses may override this routine to provide different behavior.
-  OwningStmtResult RebuildIfStmt(SourceLocation IfLoc, Sema::FullExprArg Cond,
+  StmtResult RebuildIfStmt(SourceLocation IfLoc, Sema::FullExprArg Cond,
                                  VarDecl *CondVar, Stmt *Then, 
                                  SourceLocation ElseLoc, Stmt *Else) {
     return getSema().ActOnIfStmt(IfLoc, Cond, CondVar, Then, ElseLoc, Else);
@@ -775,7 +773,7 @@
   ///
   /// By default, performs semantic analysis to build the new statement.
   /// Subclasses may override this routine to provide different behavior.
-  OwningStmtResult RebuildSwitchStmtStart(SourceLocation SwitchLoc,
+  StmtResult RebuildSwitchStmtStart(SourceLocation SwitchLoc,
                                           Expr *Cond, VarDecl *CondVar) {
     return getSema().ActOnStartOfSwitchStmt(SwitchLoc, Cond, 
                                             CondVar);
@@ -785,7 +783,7 @@
   ///
   /// By default, performs semantic analysis to build the new statement.
   /// Subclasses may override this routine to provide different behavior.
-  OwningStmtResult RebuildSwitchStmtBody(SourceLocation SwitchLoc,
+  StmtResult RebuildSwitchStmtBody(SourceLocation SwitchLoc,
                                          Stmt *Switch, Stmt *Body) {
     return getSema().ActOnFinishSwitchStmt(SwitchLoc, Switch, Body);
   }
@@ -794,7 +792,7 @@
   ///
   /// By default, performs semantic analysis to build the new statement.
   /// Subclasses may override this routine to provide different behavior.
-  OwningStmtResult RebuildWhileStmt(SourceLocation WhileLoc,
+  StmtResult RebuildWhileStmt(SourceLocation WhileLoc,
                                     Sema::FullExprArg Cond,
                                     VarDecl *CondVar,
                                     Stmt *Body) {
@@ -805,7 +803,7 @@
   ///
   /// By default, performs semantic analysis to build the new statement.
   /// Subclasses may override this routine to provide different behavior.
-  OwningStmtResult RebuildDoStmt(SourceLocation DoLoc, Stmt *Body,
+  StmtResult RebuildDoStmt(SourceLocation DoLoc, Stmt *Body,
                                  SourceLocation WhileLoc,
                                  SourceLocation LParenLoc,
                                  Expr *Cond,
@@ -818,7 +816,7 @@
   ///
   /// By default, performs semantic analysis to build the new statement.
   /// Subclasses may override this routine to provide different behavior.
-  OwningStmtResult RebuildForStmt(SourceLocation ForLoc,
+  StmtResult RebuildForStmt(SourceLocation ForLoc,
                                   SourceLocation LParenLoc,
                                   Stmt *Init, Sema::FullExprArg Cond, 
                                   VarDecl *CondVar, Sema::FullExprArg Inc,
@@ -832,7 +830,7 @@
   ///
   /// By default, performs semantic analysis to build the new statement.
   /// Subclasses may override this routine to provide different behavior.
-  OwningStmtResult RebuildGotoStmt(SourceLocation GotoLoc,
+  StmtResult RebuildGotoStmt(SourceLocation GotoLoc,
                                    SourceLocation LabelLoc,
                                    LabelStmt *Label) {
     return getSema().ActOnGotoStmt(GotoLoc, LabelLoc, Label->getID());
@@ -842,7 +840,7 @@
   ///
   /// By default, performs semantic analysis to build the new statement.
   /// Subclasses may override this routine to provide different behavior.
-  OwningStmtResult RebuildIndirectGotoStmt(SourceLocation GotoLoc,
+  StmtResult RebuildIndirectGotoStmt(SourceLocation GotoLoc,
                                            SourceLocation StarLoc,
                                            Expr *Target) {
     return getSema().ActOnIndirectGotoStmt(GotoLoc, StarLoc, Target);
@@ -852,7 +850,7 @@
   ///
   /// By default, performs semantic analysis to build the new statement.
   /// Subclasses may override this routine to provide different behavior.
-  OwningStmtResult RebuildReturnStmt(SourceLocation ReturnLoc,
+  StmtResult RebuildReturnStmt(SourceLocation ReturnLoc,
                                      Expr *Result) {
 
     return getSema().ActOnReturnStmt(ReturnLoc, Result);
@@ -862,7 +860,7 @@
   ///
   /// By default, performs semantic analysis to build the new statement.
   /// Subclasses may override this routine to provide different behavior.
-  OwningStmtResult RebuildDeclStmt(Decl **Decls, unsigned NumDecls,
+  StmtResult RebuildDeclStmt(Decl **Decls, unsigned NumDecls,
                                    SourceLocation StartLoc,
                                    SourceLocation EndLoc) {
     return getSema().Owned(
@@ -876,7 +874,7 @@
   ///
   /// By default, performs semantic analysis to build the new statement.
   /// Subclasses may override this routine to provide different behavior.
-  OwningStmtResult RebuildAsmStmt(SourceLocation AsmLoc,
+  StmtResult RebuildAsmStmt(SourceLocation AsmLoc,
                                   bool IsSimple,
                                   bool IsVolatile,
                                   unsigned NumOutputs,
@@ -898,7 +896,7 @@
   ///
   /// By default, performs semantic analysis to build the new statement.
   /// Subclasses may override this routine to provide different behavior.
-  OwningStmtResult RebuildObjCAtTryStmt(SourceLocation AtLoc,
+  StmtResult RebuildObjCAtTryStmt(SourceLocation AtLoc,
                                         Stmt *TryBody,
                                         MultiStmtArg CatchStmts,
                                         Stmt *Finally) {
@@ -921,7 +919,7 @@
   ///
   /// By default, performs semantic analysis to build the new statement.
   /// Subclasses may override this routine to provide different behavior.
-  OwningStmtResult RebuildObjCAtCatchStmt(SourceLocation AtLoc,
+  StmtResult RebuildObjCAtCatchStmt(SourceLocation AtLoc,
                                           SourceLocation RParenLoc,
                                           VarDecl *Var,
                                           Stmt *Body) {
@@ -933,7 +931,7 @@
   ///
   /// By default, performs semantic analysis to build the new statement.
   /// Subclasses may override this routine to provide different behavior.
-  OwningStmtResult RebuildObjCAtFinallyStmt(SourceLocation AtLoc,
+  StmtResult RebuildObjCAtFinallyStmt(SourceLocation AtLoc,
                                             Stmt *Body) {
     return getSema().ActOnObjCAtFinallyStmt(AtLoc, Body);
   }
@@ -942,7 +940,7 @@
   ///
   /// By default, performs semantic analysis to build the new statement.
   /// Subclasses may override this routine to provide different behavior.
-  OwningStmtResult RebuildObjCAtThrowStmt(SourceLocation AtLoc,
+  StmtResult RebuildObjCAtThrowStmt(SourceLocation AtLoc,
                                           Expr *Operand) {
     return getSema().BuildObjCAtThrowStmt(AtLoc, Operand);
   }
@@ -951,7 +949,7 @@
   ///
   /// By default, performs semantic analysis to build the new statement.
   /// Subclasses may override this routine to provide different behavior.
-  OwningStmtResult RebuildObjCAtSynchronizedStmt(SourceLocation AtLoc,
+  StmtResult RebuildObjCAtSynchronizedStmt(SourceLocation AtLoc,
                                                  Expr *Object,
                                                  Stmt *Body) {
     return getSema().ActOnObjCAtSynchronizedStmt(AtLoc, Object,
@@ -962,7 +960,7 @@
   ///
   /// By default, performs semantic analysis to build the new statement.
   /// Subclasses may override this routine to provide different behavior.
-  OwningStmtResult RebuildObjCForCollectionStmt(SourceLocation ForLoc,
+  StmtResult RebuildObjCForCollectionStmt(SourceLocation ForLoc,
                                                 SourceLocation LParenLoc,
                                                 Stmt *Element,
                                                 Expr *Collection,
@@ -992,7 +990,7 @@
   ///
   /// By default, performs semantic analysis to build the new statement.
   /// Subclasses may override this routine to provide different behavior.
-  OwningStmtResult RebuildCXXCatchStmt(SourceLocation CatchLoc,
+  StmtResult RebuildCXXCatchStmt(SourceLocation CatchLoc,
                                        VarDecl *ExceptionDecl,
                                        Stmt *Handler) {
     return Owned(new (getSema().Context) CXXCatchStmt(CatchLoc, ExceptionDecl,
@@ -1003,7 +1001,7 @@
   ///
   /// By default, performs semantic analysis to build the new statement.
   /// Subclasses may override this routine to provide different behavior.
-  OwningStmtResult RebuildCXXTryStmt(SourceLocation TryLoc,
+  StmtResult RebuildCXXTryStmt(SourceLocation TryLoc,
                                      Stmt *TryBlock,
                                      MultiStmtArg Handlers) {
     return getSema().ActOnCXXTryBlock(TryLoc, TryBlock, move(Handlers));
@@ -1013,7 +1011,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildDeclarationNameExpr(const CXXScopeSpec &SS,
+  ExprResult RebuildDeclarationNameExpr(const CXXScopeSpec &SS,
                                               LookupResult &R,
                                               bool RequiresADL) {
     return getSema().BuildDeclarationNameExpr(SS, R, RequiresADL);
@@ -1024,7 +1022,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildDeclRefExpr(NestedNameSpecifier *Qualifier,
+  ExprResult RebuildDeclRefExpr(NestedNameSpecifier *Qualifier,
                                       SourceRange QualifierRange,
                                       ValueDecl *VD,
                                       const DeclarationNameInfo &NameInfo,
@@ -1042,7 +1040,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildParenExpr(Expr *SubExpr, SourceLocation LParen,
+  ExprResult RebuildParenExpr(Expr *SubExpr, SourceLocation LParen,
                                     SourceLocation RParen) {
     return getSema().ActOnParenExpr(LParen, RParen, SubExpr);
   }
@@ -1051,7 +1049,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildCXXPseudoDestructorExpr(Expr *Base,
+  ExprResult RebuildCXXPseudoDestructorExpr(Expr *Base,
                                                   SourceLocation OperatorLoc,
                                                   bool isArrow,
                                                 NestedNameSpecifier *Qualifier,
@@ -1065,7 +1063,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildUnaryOperator(SourceLocation OpLoc,
+  ExprResult RebuildUnaryOperator(SourceLocation OpLoc,
                                         UnaryOperator::Opcode Opc,
                                         Expr *SubExpr) {
     return getSema().BuildUnaryOp(/*Scope=*/0, OpLoc, Opc, SubExpr);
@@ -1075,7 +1073,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildOffsetOfExpr(SourceLocation OperatorLoc,
+  ExprResult RebuildOffsetOfExpr(SourceLocation OperatorLoc,
                                        TypeSourceInfo *Type,
                                        Action::OffsetOfComponent *Components,
                                        unsigned NumComponents,
@@ -1088,7 +1086,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildSizeOfAlignOf(TypeSourceInfo *TInfo,
+  ExprResult RebuildSizeOfAlignOf(TypeSourceInfo *TInfo,
                                         SourceLocation OpLoc,
                                         bool isSizeOf, SourceRange R) {
     return getSema().CreateSizeOfAlignOfExpr(TInfo, OpLoc, isSizeOf, R);
@@ -1099,9 +1097,9 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildSizeOfAlignOf(Expr *SubExpr, SourceLocation OpLoc,
+  ExprResult RebuildSizeOfAlignOf(Expr *SubExpr, SourceLocation OpLoc,
                                         bool isSizeOf, SourceRange R) {
-    OwningExprResult Result
+    ExprResult Result
       = getSema().CreateSizeOfAlignOfExpr(SubExpr, OpLoc, isSizeOf, R);
     if (Result.isInvalid())
       return getSema().ExprError();
@@ -1113,7 +1111,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildArraySubscriptExpr(Expr *LHS,
+  ExprResult RebuildArraySubscriptExpr(Expr *LHS,
                                              SourceLocation LBracketLoc,
                                              Expr *RHS,
                                              SourceLocation RBracketLoc) {
@@ -1126,7 +1124,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildCallExpr(Expr *Callee, SourceLocation LParenLoc,
+  ExprResult RebuildCallExpr(Expr *Callee, SourceLocation LParenLoc,
                                    MultiExprArg Args,
                                    SourceLocation *CommaLocs,
                                    SourceLocation RParenLoc) {
@@ -1138,7 +1136,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildMemberExpr(Expr *Base, SourceLocation OpLoc,
+  ExprResult RebuildMemberExpr(Expr *Base, SourceLocation OpLoc,
                                      bool isArrow,
                                      NestedNameSpecifier *Qualifier,
                                      SourceRange QualifierRange,
@@ -1186,7 +1184,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildBinaryOperator(SourceLocation OpLoc,
+  ExprResult RebuildBinaryOperator(SourceLocation OpLoc,
                                          BinaryOperator::Opcode Opc,
                                          Expr *LHS, Expr *RHS) {
     return getSema().BuildBinOp(/*Scope=*/0, OpLoc, Opc, LHS, RHS);
@@ -1196,7 +1194,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildConditionalOperator(Expr *Cond,
+  ExprResult RebuildConditionalOperator(Expr *Cond,
                                               SourceLocation QuestionLoc,
                                               Expr *LHS,
                                               SourceLocation ColonLoc,
@@ -1209,7 +1207,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildCStyleCastExpr(SourceLocation LParenLoc,
+  ExprResult RebuildCStyleCastExpr(SourceLocation LParenLoc,
                                          TypeSourceInfo *TInfo,
                                          SourceLocation RParenLoc,
                                          Expr *SubExpr) {
@@ -1221,7 +1219,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildCompoundLiteralExpr(SourceLocation LParenLoc,
+  ExprResult RebuildCompoundLiteralExpr(SourceLocation LParenLoc,
                                               TypeSourceInfo *TInfo,
                                               SourceLocation RParenLoc,
                                               Expr *Init) {
@@ -1233,7 +1231,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildExtVectorElementExpr(Expr *Base,
+  ExprResult RebuildExtVectorElementExpr(Expr *Base,
                                                SourceLocation OpLoc,
                                                SourceLocation AccessorLoc,
                                                IdentifierInfo &Accessor) {
@@ -1251,11 +1249,11 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildInitList(SourceLocation LBraceLoc,
+  ExprResult RebuildInitList(SourceLocation LBraceLoc,
                                    MultiExprArg Inits,
                                    SourceLocation RBraceLoc,
                                    QualType ResultTy) {
-    OwningExprResult Result
+    ExprResult Result
       = SemaRef.ActOnInitList(LBraceLoc, move(Inits), RBraceLoc);
     if (Result.isInvalid() || ResultTy->isDependentType())
       return move(Result);
@@ -1271,12 +1269,12 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildDesignatedInitExpr(Designation &Desig,
+  ExprResult RebuildDesignatedInitExpr(Designation &Desig,
                                              MultiExprArg ArrayExprs,
                                              SourceLocation EqualOrColonLoc,
                                              bool GNUSyntax,
                                              Expr *Init) {
-    OwningExprResult Result
+    ExprResult Result
       = SemaRef.ActOnDesignatedInitializer(Desig, EqualOrColonLoc, GNUSyntax,
                                            Init);
     if (Result.isInvalid())
@@ -1291,7 +1289,7 @@
   /// By default, builds the implicit value initialization without performing
   /// any semantic analysis. Subclasses may override this routine to provide
   /// different behavior.
-  OwningExprResult RebuildImplicitValueInitExpr(QualType T) {
+  ExprResult RebuildImplicitValueInitExpr(QualType T) {
     return SemaRef.Owned(new (SemaRef.Context) ImplicitValueInitExpr(T));
   }
 
@@ -1299,7 +1297,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildVAArgExpr(SourceLocation BuiltinLoc,
+  ExprResult RebuildVAArgExpr(SourceLocation BuiltinLoc,
                                     Expr *SubExpr, TypeSourceInfo *TInfo,
                                     SourceLocation RParenLoc) {
     return getSema().BuildVAArgExpr(BuiltinLoc,
@@ -1311,7 +1309,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildParenListExpr(SourceLocation LParenLoc,
+  ExprResult RebuildParenListExpr(SourceLocation LParenLoc,
                                         MultiExprArg SubExprs,
                                         SourceLocation RParenLoc) {
     return getSema().ActOnParenOrParenListExpr(LParenLoc, RParenLoc, 
@@ -1323,7 +1321,7 @@
   /// By default, performs semantic analysis, using the name of the label
   /// rather than attempting to map the label statement itself.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildAddrLabelExpr(SourceLocation AmpAmpLoc,
+  ExprResult RebuildAddrLabelExpr(SourceLocation AmpAmpLoc,
                                         SourceLocation LabelLoc,
                                         LabelStmt *Label) {
     return getSema().ActOnAddrLabel(AmpAmpLoc, LabelLoc, Label->getID());
@@ -1333,7 +1331,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildStmtExpr(SourceLocation LParenLoc,
+  ExprResult RebuildStmtExpr(SourceLocation LParenLoc,
                                    Stmt *SubStmt,
                                    SourceLocation RParenLoc) {
     return getSema().ActOnStmtExpr(LParenLoc, SubStmt, RParenLoc);
@@ -1343,7 +1341,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildTypesCompatibleExpr(SourceLocation BuiltinLoc,
+  ExprResult RebuildTypesCompatibleExpr(SourceLocation BuiltinLoc,
                                               TypeSourceInfo *TInfo1,
                                               TypeSourceInfo *TInfo2,
                                               SourceLocation RParenLoc) {
@@ -1356,7 +1354,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildChooseExpr(SourceLocation BuiltinLoc,
+  ExprResult RebuildChooseExpr(SourceLocation BuiltinLoc,
                                      Expr *Cond, Expr *LHS, Expr *RHS,
                                      SourceLocation RParenLoc) {
     return SemaRef.ActOnChooseExpr(BuiltinLoc,
@@ -1372,7 +1370,7 @@
   /// operator call into a use of a builtin operator, performing
   /// argument-dependent lookup, etc. Subclasses may override this routine to
   /// provide different behavior.
-  OwningExprResult RebuildCXXOperatorCallExpr(OverloadedOperatorKind Op,
+  ExprResult RebuildCXXOperatorCallExpr(OverloadedOperatorKind Op,
                                               SourceLocation OpLoc,
                                               Expr *Callee,
                                               Expr *First,
@@ -1384,7 +1382,7 @@
   /// By default, this routine dispatches to one of the more-specific routines
   /// for a particular named case, e.g., RebuildCXXStaticCastExpr().
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildCXXNamedCastExpr(SourceLocation OpLoc,
+  ExprResult RebuildCXXNamedCastExpr(SourceLocation OpLoc,
                                            Stmt::StmtClass Class,
                                            SourceLocation LAngleLoc,
                                            TypeSourceInfo *TInfo,
@@ -1426,7 +1424,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildCXXStaticCastExpr(SourceLocation OpLoc,
+  ExprResult RebuildCXXStaticCastExpr(SourceLocation OpLoc,
                                             SourceLocation LAngleLoc,
                                             TypeSourceInfo *TInfo,
                                             SourceLocation RAngleLoc,
@@ -1443,7 +1441,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildCXXDynamicCastExpr(SourceLocation OpLoc,
+  ExprResult RebuildCXXDynamicCastExpr(SourceLocation OpLoc,
                                              SourceLocation LAngleLoc,
                                              TypeSourceInfo *TInfo,
                                              SourceLocation RAngleLoc,
@@ -1460,7 +1458,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildCXXReinterpretCastExpr(SourceLocation OpLoc,
+  ExprResult RebuildCXXReinterpretCastExpr(SourceLocation OpLoc,
                                                  SourceLocation LAngleLoc,
                                                  TypeSourceInfo *TInfo,
                                                  SourceLocation RAngleLoc,
@@ -1477,7 +1475,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildCXXConstCastExpr(SourceLocation OpLoc,
+  ExprResult RebuildCXXConstCastExpr(SourceLocation OpLoc,
                                            SourceLocation LAngleLoc,
                                            TypeSourceInfo *TInfo,
                                            SourceLocation RAngleLoc,
@@ -1494,7 +1492,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildCXXFunctionalCastExpr(SourceRange TypeRange,
+  ExprResult RebuildCXXFunctionalCastExpr(SourceRange TypeRange,
                                                 TypeSourceInfo *TInfo,
                                                 SourceLocation LParenLoc,
                                                 Expr *Sub,
@@ -1511,7 +1509,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildCXXTypeidExpr(QualType TypeInfoType,
+  ExprResult RebuildCXXTypeidExpr(QualType TypeInfoType,
                                         SourceLocation TypeidLoc,
                                         TypeSourceInfo *Operand,
                                         SourceLocation RParenLoc) {
@@ -1523,7 +1521,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildCXXTypeidExpr(QualType TypeInfoType,
+  ExprResult RebuildCXXTypeidExpr(QualType TypeInfoType,
                                         SourceLocation TypeidLoc,
                                         Expr *Operand,
                                         SourceLocation RParenLoc) {
@@ -1536,7 +1534,7 @@
   /// By default, builds a new "this" expression without performing any
   /// semantic analysis. Subclasses may override this routine to provide
   /// different behavior.
-  OwningExprResult RebuildCXXThisExpr(SourceLocation ThisLoc,
+  ExprResult RebuildCXXThisExpr(SourceLocation ThisLoc,
                                       QualType ThisType,
                                       bool isImplicit) {
     return getSema().Owned(
@@ -1548,7 +1546,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildCXXThrowExpr(SourceLocation ThrowLoc, Expr *Sub) {
+  ExprResult RebuildCXXThrowExpr(SourceLocation ThrowLoc, Expr *Sub) {
     return getSema().ActOnCXXThrow(ThrowLoc, Sub);
   }
 
@@ -1557,7 +1555,7 @@
   /// By default, builds a new default-argument expression, which does not
   /// require any semantic analysis. Subclasses may override this routine to
   /// provide different behavior.
-  OwningExprResult RebuildCXXDefaultArgExpr(SourceLocation Loc, 
+  ExprResult RebuildCXXDefaultArgExpr(SourceLocation Loc, 
                                             ParmVarDecl *Param) {
     return getSema().Owned(CXXDefaultArgExpr::Create(getSema().Context, Loc,
                                                      Param));
@@ -1567,7 +1565,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildCXXScalarValueInitExpr(SourceLocation TypeStartLoc,
+  ExprResult RebuildCXXScalarValueInitExpr(SourceLocation TypeStartLoc,
                                                SourceLocation LParenLoc,
                                                QualType T,
                                                SourceLocation RParenLoc) {
@@ -1581,7 +1579,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildCXXNewExpr(SourceLocation StartLoc,
+  ExprResult RebuildCXXNewExpr(SourceLocation StartLoc,
                                      bool UseGlobal,
                                      SourceLocation PlacementLParen,
                                      MultiExprArg PlacementArgs,
@@ -1612,7 +1610,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildCXXDeleteExpr(SourceLocation StartLoc,
+  ExprResult RebuildCXXDeleteExpr(SourceLocation StartLoc,
                                         bool IsGlobalDelete,
                                         bool IsArrayForm,
                                         Expr *Operand) {
@@ -1624,7 +1622,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildUnaryTypeTrait(UnaryTypeTrait Trait,
+  ExprResult RebuildUnaryTypeTrait(UnaryTypeTrait Trait,
                                          SourceLocation StartLoc,
                                          SourceLocation LParenLoc,
                                          QualType T,
@@ -1638,7 +1636,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildDependentScopeDeclRefExpr(NestedNameSpecifier *NNS,
+  ExprResult RebuildDependentScopeDeclRefExpr(NestedNameSpecifier *NNS,
                                                 SourceRange QualifierRange,
                                        const DeclarationNameInfo &NameInfo,
                               const TemplateArgumentListInfo *TemplateArgs) {
@@ -1657,7 +1655,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildTemplateIdExpr(const CXXScopeSpec &SS,
+  ExprResult RebuildTemplateIdExpr(const CXXScopeSpec &SS,
                                          LookupResult &R,
                                          bool RequiresADL,
                               const TemplateArgumentListInfo &TemplateArgs) {
@@ -1668,7 +1666,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildCXXConstructExpr(QualType T,
+  ExprResult RebuildCXXConstructExpr(QualType T,
                                            SourceLocation Loc,
                                            CXXConstructorDecl *Constructor,
                                            bool IsElidable,
@@ -1689,7 +1687,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildCXXTemporaryObjectExpr(SourceLocation TypeBeginLoc,
+  ExprResult RebuildCXXTemporaryObjectExpr(SourceLocation TypeBeginLoc,
                                                  QualType T,
                                                  SourceLocation LParenLoc,
                                                  MultiExprArg Args,
@@ -1707,7 +1705,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildCXXUnresolvedConstructExpr(SourceLocation TypeBeginLoc,
+  ExprResult RebuildCXXUnresolvedConstructExpr(SourceLocation TypeBeginLoc,
                                                      QualType T,
                                                      SourceLocation LParenLoc,
                                                      MultiExprArg Args,
@@ -1726,7 +1724,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildCXXDependentScopeMemberExpr(Expr *BaseE,
+  ExprResult RebuildCXXDependentScopeMemberExpr(Expr *BaseE,
                                                   QualType BaseType,
                                                   bool IsArrow,
                                                   SourceLocation OperatorLoc,
@@ -1750,7 +1748,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildUnresolvedMemberExpr(Expr *BaseE,
+  ExprResult RebuildUnresolvedMemberExpr(Expr *BaseE,
                                                QualType BaseType,
                                                SourceLocation OperatorLoc,
                                                bool IsArrow,
@@ -1773,7 +1771,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildObjCEncodeExpr(SourceLocation AtLoc,
+  ExprResult RebuildObjCEncodeExpr(SourceLocation AtLoc,
                                          TypeSourceInfo *EncodeTypeInfo,
                                          SourceLocation RParenLoc) {
     return SemaRef.Owned(SemaRef.BuildObjCEncodeExpression(AtLoc, EncodeTypeInfo,
@@ -1781,7 +1779,7 @@
   }
 
   /// \brief Build a new Objective-C class message.
-  OwningExprResult RebuildObjCMessageExpr(TypeSourceInfo *ReceiverTypeInfo,
+  ExprResult RebuildObjCMessageExpr(TypeSourceInfo *ReceiverTypeInfo,
                                           Selector Sel,
                                           ObjCMethodDecl *Method,
                                           SourceLocation LBracLoc, 
@@ -1795,7 +1793,7 @@
   }
 
   /// \brief Build a new Objective-C instance message.
-  OwningExprResult RebuildObjCMessageExpr(Expr *Receiver,
+  ExprResult RebuildObjCMessageExpr(Expr *Receiver,
                                           Selector Sel,
                                           ObjCMethodDecl *Method,
                                           SourceLocation LBracLoc, 
@@ -1812,7 +1810,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildObjCIvarRefExpr(Expr *BaseArg, ObjCIvarDecl *Ivar,
+  ExprResult RebuildObjCIvarRefExpr(Expr *BaseArg, ObjCIvarDecl *Ivar,
                                           SourceLocation IvarLoc,
                                           bool IsArrow, bool IsFreeIvar) {
     // FIXME: We lose track of the IsFreeIvar bit.
@@ -1820,7 +1818,7 @@
     Expr *Base = BaseArg;
     LookupResult R(getSema(), Ivar->getDeclName(), IvarLoc,
                    Sema::LookupMemberName);
-    OwningExprResult Result = getSema().LookupMemberExpr(R, Base, IsArrow,
+    ExprResult Result = getSema().LookupMemberExpr(R, Base, IsArrow,
                                                          /*FIME:*/IvarLoc,
                                                          SS, 0,
                                                          false);
@@ -1841,7 +1839,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildObjCPropertyRefExpr(Expr *BaseArg, 
+  ExprResult RebuildObjCPropertyRefExpr(Expr *BaseArg, 
                                               ObjCPropertyDecl *Property,
                                               SourceLocation PropertyLoc) {
     CXXScopeSpec SS;
@@ -1849,7 +1847,7 @@
     LookupResult R(getSema(), Property->getDeclName(), PropertyLoc,
                    Sema::LookupMemberName);
     bool IsArrow = false;
-    OwningExprResult Result = getSema().LookupMemberExpr(R, Base, IsArrow,
+    ExprResult Result = getSema().LookupMemberExpr(R, Base, IsArrow,
                                                          /*FIME:*/PropertyLoc,
                                                          SS, 0, false);
     if (Result.isInvalid())
@@ -1871,7 +1869,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.  
-  OwningExprResult RebuildObjCImplicitSetterGetterRefExpr(
+  ExprResult RebuildObjCImplicitSetterGetterRefExpr(
                                                         ObjCMethodDecl *Getter,
                                                           QualType T,
                                                         ObjCMethodDecl *Setter,
@@ -1890,13 +1888,13 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildObjCIsaExpr(Expr *BaseArg, SourceLocation IsaLoc,
+  ExprResult RebuildObjCIsaExpr(Expr *BaseArg, SourceLocation IsaLoc,
                                       bool IsArrow) {
     CXXScopeSpec SS;
     Expr *Base = BaseArg;
     LookupResult R(getSema(), &getSema().Context.Idents.get("isa"), IsaLoc,
                    Sema::LookupMemberName);
-    OwningExprResult Result = getSema().LookupMemberExpr(R, Base, IsArrow,
+    ExprResult Result = getSema().LookupMemberExpr(R, Base, IsArrow,
                                                          /*FIME:*/IsaLoc,
                                                          SS, 0, false);
     if (Result.isInvalid())
@@ -1916,7 +1914,7 @@
   ///
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
-  OwningExprResult RebuildShuffleVectorExpr(SourceLocation BuiltinLoc,
+  ExprResult RebuildShuffleVectorExpr(SourceLocation BuiltinLoc,
                                             MultiExprArg SubExprs,
                                             SourceLocation RParenLoc) {
     // Find the declaration for __builtin_shufflevector
@@ -1940,10 +1938,10 @@
                                                        Subs, NumSubExprs,
                                                    Builtin->getCallResultType(),
                                                        RParenLoc);
-    OwningExprResult OwnedCall(SemaRef.Owned(TheCall));
+    ExprResult OwnedCall(SemaRef.Owned(TheCall));
 
     // Type-check the __builtin_shufflevector expression.
-    OwningExprResult Result = SemaRef.SemaBuiltinShuffleVector(TheCall);
+    ExprResult Result = SemaRef.SemaBuiltinShuffleVector(TheCall);
     if (Result.isInvalid())
       return SemaRef.ExprError();
 
@@ -1953,7 +1951,7 @@
 };
 
 template<typename Derived>
-Sema::OwningStmtResult TreeTransform<Derived>::TransformStmt(Stmt *S) {
+StmtResult TreeTransform<Derived>::TransformStmt(Stmt *S) {
   if (!S)
     return SemaRef.Owned(S);
 
@@ -1972,7 +1970,7 @@
 #define EXPR(Node, Parent) case Stmt::Node##Class:
 #include "clang/AST/StmtNodes.inc"
     {
-      Sema::OwningExprResult E = getDerived().TransformExpr(cast<Expr>(S));
+      ExprResult E = getDerived().TransformExpr(cast<Expr>(S));
       if (E.isInvalid())
         return getSema().StmtError();
 
@@ -1985,7 +1983,7 @@
 
 
 template<typename Derived>
-Sema::OwningExprResult TreeTransform<Derived>::TransformExpr(Expr *E) {
+ExprResult TreeTransform<Derived>::TransformExpr(Expr *E) {
   if (!E)
     return SemaRef.Owned(E);
 
@@ -2273,7 +2271,7 @@
     if (SourceExpr) {
       EnterExpressionEvaluationContext Unevaluated(getSema(),
                                                    Action::Unevaluated);
-      Sema::OwningExprResult E = getDerived().TransformExpr(SourceExpr);
+      ExprResult E = getDerived().TransformExpr(SourceExpr);
       SourceExpr = (E.isInvalid() ? 0 : E.take());
     }
 
@@ -2302,7 +2300,7 @@
     Expr *InputExpr = Input.getSourceExpression();
     if (!InputExpr) InputExpr = Input.getArgument().getAsExpr();
 
-    Sema::OwningExprResult E
+    ExprResult E
       = getDerived().TransformExpr(InputExpr);
     if (E.isInvalid()) return true;
     Output = TemplateArgumentLoc(TemplateArgument(E.take()), E.take());
@@ -2677,7 +2675,7 @@
   // Array bounds are not potentially evaluated contexts
   EnterExpressionEvaluationContext Unevaluated(SemaRef, Action::Unevaluated);
 
-  Sema::OwningExprResult SizeResult
+  ExprResult SizeResult
     = getDerived().TransformExpr(T->getSizeExpr());
   if (SizeResult.isInvalid())
     return QualType();
@@ -2718,7 +2716,7 @@
   // Array bounds are not potentially evaluated contexts
   EnterExpressionEvaluationContext Unevaluated(SemaRef, Action::Unevaluated);
 
-  Sema::OwningExprResult SizeResult
+  ExprResult SizeResult
     = getDerived().TransformExpr(T->getSizeExpr());
   if (SizeResult.isInvalid())
     return QualType();
@@ -2764,7 +2762,7 @@
   // Vector sizes are not potentially evaluated contexts
   EnterExpressionEvaluationContext Unevaluated(SemaRef, Action::Unevaluated);
 
-  Sema::OwningExprResult Size = getDerived().TransformExpr(T->getSizeExpr());
+  ExprResult Size = getDerived().TransformExpr(T->getSizeExpr());
   if (Size.isInvalid())
     return QualType();
 
@@ -3019,7 +3017,7 @@
   // typeof expressions are not potentially evaluated contexts
   EnterExpressionEvaluationContext Unevaluated(SemaRef, Action::Unevaluated);
 
-  Sema::OwningExprResult E = getDerived().TransformExpr(TL.getUnderlyingExpr());
+  ExprResult E = getDerived().TransformExpr(TL.getUnderlyingExpr());
   if (E.isInvalid())
     return QualType();
 
@@ -3074,7 +3072,7 @@
   // decltype expressions are not potentially evaluated contexts
   EnterExpressionEvaluationContext Unevaluated(SemaRef, Action::Unevaluated);
 
-  Sema::OwningExprResult E = getDerived().TransformExpr(T->getUnderlyingExpr());
+  ExprResult E = getDerived().TransformExpr(T->getUnderlyingExpr());
   if (E.isInvalid())
     return QualType();
 
@@ -3427,26 +3425,26 @@
 // Statement transformation
 //===----------------------------------------------------------------------===//
 template<typename Derived>
-Sema::OwningStmtResult
+StmtResult
 TreeTransform<Derived>::TransformNullStmt(NullStmt *S) {
   return SemaRef.Owned(S->Retain());
 }
 
 template<typename Derived>
-Sema::OwningStmtResult
+StmtResult
 TreeTransform<Derived>::TransformCompoundStmt(CompoundStmt *S) {
   return getDerived().TransformCompoundStmt(S, false);
 }
 
 template<typename Derived>
-Sema::OwningStmtResult
+StmtResult
 TreeTransform<Derived>::TransformCompoundStmt(CompoundStmt *S,
                                               bool IsStmtExpr) {
   bool SubStmtChanged = false;
   ASTOwningVector<Stmt*> Statements(getSema());
   for (CompoundStmt::body_iterator B = S->body_begin(), BEnd = S->body_end();
        B != BEnd; ++B) {
-    OwningStmtResult Result = getDerived().TransformStmt(*B);
+    StmtResult Result = getDerived().TransformStmt(*B);
     if (Result.isInvalid())
       return getSema().StmtError();
 
@@ -3465,9 +3463,9 @@
 }
 
 template<typename Derived>
-Sema::OwningStmtResult
+StmtResult
 TreeTransform<Derived>::TransformCaseStmt(CaseStmt *S) {
-  OwningExprResult LHS, RHS;
+  ExprResult LHS, RHS;
   {
     // The case value expressions are not potentially evaluated.
     EnterExpressionEvaluationContext Unevaluated(SemaRef, Action::Unevaluated);
@@ -3486,7 +3484,7 @@
   // Build the case statement.
   // Case statements are always rebuilt so that they will attached to their
   // transformed switch statement.
-  OwningStmtResult Case = getDerived().RebuildCaseStmt(S->getCaseLoc(),
+  StmtResult Case = getDerived().RebuildCaseStmt(S->getCaseLoc(),
                                                        LHS.get(),
                                                        S->getEllipsisLoc(),
                                                        RHS.get(),
@@ -3495,7 +3493,7 @@
     return SemaRef.StmtError();
 
   // Transform the statement following the case
-  OwningStmtResult SubStmt = getDerived().TransformStmt(S->getSubStmt());
+  StmtResult SubStmt = getDerived().TransformStmt(S->getSubStmt());
   if (SubStmt.isInvalid())
     return SemaRef.StmtError();
 
@@ -3504,10 +3502,10 @@
 }
 
 template<typename Derived>
-Sema::OwningStmtResult
+StmtResult
 TreeTransform<Derived>::TransformDefaultStmt(DefaultStmt *S) {
   // Transform the statement following the default case
-  OwningStmtResult SubStmt = getDerived().TransformStmt(S->getSubStmt());
+  StmtResult SubStmt = getDerived().TransformStmt(S->getSubStmt());
   if (SubStmt.isInvalid())
     return SemaRef.StmtError();
 
@@ -3517,9 +3515,9 @@
 }
 
 template<typename Derived>
-Sema::OwningStmtResult
+StmtResult
 TreeTransform<Derived>::TransformLabelStmt(LabelStmt *S) {
-  OwningStmtResult SubStmt = getDerived().TransformStmt(S->getSubStmt());
+  StmtResult SubStmt = getDerived().TransformStmt(S->getSubStmt());
   if (SubStmt.isInvalid())
     return SemaRef.StmtError();
 
@@ -3530,10 +3528,10 @@
 }
 
 template<typename Derived>
-Sema::OwningStmtResult
+StmtResult
 TreeTransform<Derived>::TransformIfStmt(IfStmt *S) {
   // Transform the condition
-  OwningExprResult Cond;
+  ExprResult Cond;
   VarDecl *ConditionVar = 0;
   if (S->getConditionVariable()) {
     ConditionVar 
@@ -3551,7 +3549,7 @@
     
     // Convert the condition to a boolean value.
     if (S->getCond()) {
-      OwningExprResult CondE = getSema().ActOnBooleanCondition(0, 
+      ExprResult CondE = getSema().ActOnBooleanCondition(0, 
                                                                S->getIfLoc(), 
                                                                Cond.get());
       if (CondE.isInvalid())
@@ -3566,12 +3564,12 @@
     return SemaRef.StmtError();
   
   // Transform the "then" branch.
-  OwningStmtResult Then = getDerived().TransformStmt(S->getThen());
+  StmtResult Then = getDerived().TransformStmt(S->getThen());
   if (Then.isInvalid())
     return SemaRef.StmtError();
 
   // Transform the "else" branch.
-  OwningStmtResult Else = getDerived().TransformStmt(S->getElse());
+  StmtResult Else = getDerived().TransformStmt(S->getElse());
   if (Else.isInvalid())
     return SemaRef.StmtError();
 
@@ -3588,10 +3586,10 @@
 }
 
 template<typename Derived>
-Sema::OwningStmtResult
+StmtResult
 TreeTransform<Derived>::TransformSwitchStmt(SwitchStmt *S) {
   // Transform the condition.
-  OwningExprResult Cond;
+  ExprResult Cond;
   VarDecl *ConditionVar = 0;
   if (S->getConditionVariable()) {
     ConditionVar 
@@ -3609,14 +3607,14 @@
   }
 
   // Rebuild the switch statement.
-  OwningStmtResult Switch
+  StmtResult Switch
     = getDerived().RebuildSwitchStmtStart(S->getSwitchLoc(), Cond.get(),
                                           ConditionVar);
   if (Switch.isInvalid())
     return SemaRef.StmtError();
 
   // Transform the body of the switch statement.
-  OwningStmtResult Body = getDerived().TransformStmt(S->getBody());
+  StmtResult Body = getDerived().TransformStmt(S->getBody());
   if (Body.isInvalid())
     return SemaRef.StmtError();
 
@@ -3626,10 +3624,10 @@
 }
 
 template<typename Derived>
-Sema::OwningStmtResult
+StmtResult
 TreeTransform<Derived>::TransformWhileStmt(WhileStmt *S) {
   // Transform the condition
-  OwningExprResult Cond;
+  ExprResult Cond;
   VarDecl *ConditionVar = 0;
   if (S->getConditionVariable()) {
     ConditionVar 
@@ -3647,7 +3645,7 @@
 
     if (S->getCond()) {
       // Convert the condition to a boolean value.
-      OwningExprResult CondE = getSema().ActOnBooleanCondition(0, 
+      ExprResult CondE = getSema().ActOnBooleanCondition(0, 
                                                              S->getWhileLoc(), 
                                                                Cond.get());
       if (CondE.isInvalid())
@@ -3661,7 +3659,7 @@
     return SemaRef.StmtError();
 
   // Transform the body
-  OwningStmtResult Body = getDerived().TransformStmt(S->getBody());
+  StmtResult Body = getDerived().TransformStmt(S->getBody());
   if (Body.isInvalid())
     return SemaRef.StmtError();
 
@@ -3676,15 +3674,15 @@
 }
 
 template<typename Derived>
-Sema::OwningStmtResult
+StmtResult
 TreeTransform<Derived>::TransformDoStmt(DoStmt *S) {
   // Transform the body
-  OwningStmtResult Body = getDerived().TransformStmt(S->getBody());
+  StmtResult Body = getDerived().TransformStmt(S->getBody());
   if (Body.isInvalid())
     return SemaRef.StmtError();
 
   // Transform the condition
-  OwningExprResult Cond = getDerived().TransformExpr(S->getCond());
+  ExprResult Cond = getDerived().TransformExpr(S->getCond());
   if (Cond.isInvalid())
     return SemaRef.StmtError();
   
@@ -3699,15 +3697,15 @@
 }
 
 template<typename Derived>
-Sema::OwningStmtResult
+StmtResult
 TreeTransform<Derived>::TransformForStmt(ForStmt *S) {
   // Transform the initialization statement
-  OwningStmtResult Init = getDerived().TransformStmt(S->getInit());
+  StmtResult Init = getDerived().TransformStmt(S->getInit());
   if (Init.isInvalid())
     return SemaRef.StmtError();
 
   // Transform the condition
-  OwningExprResult Cond;
+  ExprResult Cond;
   VarDecl *ConditionVar = 0;
   if (S->getConditionVariable()) {
     ConditionVar 
@@ -3725,7 +3723,7 @@
 
     if (S->getCond()) {
       // Convert the condition to a boolean value.
-      OwningExprResult CondE = getSema().ActOnBooleanCondition(0, 
+      ExprResult CondE = getSema().ActOnBooleanCondition(0, 
                                                                S->getForLoc(), 
                                                                Cond.get());
       if (CondE.isInvalid())
@@ -3740,7 +3738,7 @@
     return SemaRef.StmtError();
 
   // Transform the increment
-  OwningExprResult Inc = getDerived().TransformExpr(S->getInc());
+  ExprResult Inc = getDerived().TransformExpr(S->getInc());
   if (Inc.isInvalid())
     return SemaRef.StmtError();
 
@@ -3749,7 +3747,7 @@
     return SemaRef.StmtError();
 
   // Transform the body
-  OwningStmtResult Body = getDerived().TransformStmt(S->getBody());
+  StmtResult Body = getDerived().TransformStmt(S->getBody());
   if (Body.isInvalid())
     return SemaRef.StmtError();
 
@@ -3766,7 +3764,7 @@
 }
 
 template<typename Derived>
-Sema::OwningStmtResult
+StmtResult
 TreeTransform<Derived>::TransformGotoStmt(GotoStmt *S) {
   // Goto statements must always be rebuilt, to resolve the label.
   return getDerived().RebuildGotoStmt(S->getGotoLoc(), S->getLabelLoc(),
@@ -3774,9 +3772,9 @@
 }
 
 template<typename Derived>
-Sema::OwningStmtResult
+StmtResult
 TreeTransform<Derived>::TransformIndirectGotoStmt(IndirectGotoStmt *S) {
-  OwningExprResult Target = getDerived().TransformExpr(S->getTarget());
+  ExprResult Target = getDerived().TransformExpr(S->getTarget());
   if (Target.isInvalid())
     return SemaRef.StmtError();
 
@@ -3789,21 +3787,21 @@
 }
 
 template<typename Derived>
-Sema::OwningStmtResult
+StmtResult
 TreeTransform<Derived>::TransformContinueStmt(ContinueStmt *S) {
   return SemaRef.Owned(S->Retain());
 }
 
 template<typename Derived>
-Sema::OwningStmtResult
+StmtResult
 TreeTransform<Derived>::TransformBreakStmt(BreakStmt *S) {
   return SemaRef.Owned(S->Retain());
 }
 
 template<typename Derived>
-Sema::OwningStmtResult
+StmtResult
 TreeTransform<Derived>::TransformReturnStmt(ReturnStmt *S) {
-  Sema::OwningExprResult Result = getDerived().TransformExpr(S->getRetValue());
+  ExprResult Result = getDerived().TransformExpr(S->getRetValue());
   if (Result.isInvalid())
     return SemaRef.StmtError();
 
@@ -3813,7 +3811,7 @@
 }
 
 template<typename Derived>
-Sema::OwningStmtResult
+StmtResult
 TreeTransform<Derived>::TransformDeclStmt(DeclStmt *S) {
   bool DeclChanged = false;
   llvm::SmallVector<Decl *, 4> Decls;
@@ -3838,21 +3836,21 @@
 }
 
 template<typename Derived>
-Sema::OwningStmtResult
+StmtResult
 TreeTransform<Derived>::TransformSwitchCase(SwitchCase *S) {
   assert(false && "SwitchCase is abstract and cannot be transformed");
   return SemaRef.Owned(S->Retain());
 }
 
 template<typename Derived>
-Sema::OwningStmtResult
+StmtResult
 TreeTransform<Derived>::TransformAsmStmt(AsmStmt *S) {
   
   ASTOwningVector<Expr*> Constraints(getSema());
   ASTOwningVector<Expr*> Exprs(getSema());
   llvm::SmallVector<IdentifierInfo *, 4> Names;
 
-  OwningExprResult AsmString;
+  ExprResult AsmString;
   ASTOwningVector<Expr*> Clobbers(getSema());
 
   bool ExprsChanged = false;
@@ -3866,7 +3864,7 @@
     
     // Transform the output expr.
     Expr *OutputExpr = S->getOutputExpr(I);
-    OwningExprResult Result = getDerived().TransformExpr(OutputExpr);
+    ExprResult Result = getDerived().TransformExpr(OutputExpr);
     if (Result.isInvalid())
       return SemaRef.StmtError();
     
@@ -3884,7 +3882,7 @@
     
     // Transform the input expr.
     Expr *InputExpr = S->getInputExpr(I);
-    OwningExprResult Result = getDerived().TransformExpr(InputExpr);
+    ExprResult Result = getDerived().TransformExpr(InputExpr);
     if (Result.isInvalid())
       return SemaRef.StmtError();
     
@@ -3919,10 +3917,10 @@
 
 
 template<typename Derived>
-Sema::OwningStmtResult
+StmtResult
 TreeTransform<Derived>::TransformObjCAtTryStmt(ObjCAtTryStmt *S) {
   // Transform the body of the @try.
-  OwningStmtResult TryBody = getDerived().TransformStmt(S->getTryBody());
+  StmtResult TryBody = getDerived().TransformStmt(S->getTryBody());
   if (TryBody.isInvalid())
     return SemaRef.StmtError();
   
@@ -3930,7 +3928,7 @@
   bool AnyCatchChanged = false;
   ASTOwningVector<Stmt*> CatchStmts(SemaRef);
   for (unsigned I = 0, N = S->getNumCatchStmts(); I != N; ++I) {
-    OwningStmtResult Catch = getDerived().TransformStmt(S->getCatchStmt(I));
+    StmtResult Catch = getDerived().TransformStmt(S->getCatchStmt(I));
     if (Catch.isInvalid())
       return SemaRef.StmtError();
     if (Catch.get() != S->getCatchStmt(I))
@@ -3939,7 +3937,7 @@
   }
   
   // Transform the @finally statement (if present).
-  OwningStmtResult Finally;
+  StmtResult Finally;
   if (S->getFinallyStmt()) {
     Finally = getDerived().TransformStmt(S->getFinallyStmt());
     if (Finally.isInvalid())
@@ -3959,7 +3957,7 @@
 }
 
 template<typename Derived>
-Sema::OwningStmtResult
+StmtResult
 TreeTransform<Derived>::TransformObjCAtCatchStmt(ObjCAtCatchStmt *S) {
   // Transform the @catch parameter, if there is one.
   VarDecl *Var = 0;
@@ -3985,7 +3983,7 @@
       return SemaRef.StmtError();
   }
   
-  OwningStmtResult Body = getDerived().TransformStmt(S->getCatchBody());
+  StmtResult Body = getDerived().TransformStmt(S->getCatchBody());
   if (Body.isInvalid())
     return SemaRef.StmtError();
   
@@ -3995,10 +3993,10 @@
 }
 
 template<typename Derived>
-Sema::OwningStmtResult
+StmtResult
 TreeTransform<Derived>::TransformObjCAtFinallyStmt(ObjCAtFinallyStmt *S) {
   // Transform the body.
-  OwningStmtResult Body = getDerived().TransformStmt(S->getFinallyBody());
+  StmtResult Body = getDerived().TransformStmt(S->getFinallyBody());
   if (Body.isInvalid())
     return SemaRef.StmtError();
   
@@ -4013,9 +4011,9 @@
 }
 
 template<typename Derived>
-Sema::OwningStmtResult
+StmtResult
 TreeTransform<Derived>::TransformObjCAtThrowStmt(ObjCAtThrowStmt *S) {
-  OwningExprResult Operand;
+  ExprResult Operand;
   if (S->getThrowExpr()) {
     Operand = getDerived().TransformExpr(S->getThrowExpr());
     if (Operand.isInvalid())
@@ -4030,16 +4028,16 @@
 }
 
 template<typename Derived>
-Sema::OwningStmtResult
+StmtResult
 TreeTransform<Derived>::TransformObjCAtSynchronizedStmt(
                                                   ObjCAtSynchronizedStmt *S) {
   // Transform the object we are locking.
-  OwningExprResult Object = getDerived().TransformExpr(S->getSynchExpr());
+  ExprResult Object = getDerived().TransformExpr(S->getSynchExpr());
   if (Object.isInvalid())
     return SemaRef.StmtError();
   
   // Transform the body.
-  OwningStmtResult Body = getDerived().TransformStmt(S->getSynchBody());
+  StmtResult Body = getDerived().TransformStmt(S->getSynchBody());
   if (Body.isInvalid())
     return SemaRef.StmtError();
   
@@ -4055,21 +4053,21 @@
 }
 
 template<typename Derived>
-Sema::OwningStmtResult
+StmtResult
 TreeTransform<Derived>::TransformObjCForCollectionStmt(
                                                   ObjCForCollectionStmt *S) {
   // Transform the element statement.
-  OwningStmtResult Element = getDerived().TransformStmt(S->getElement());
+  StmtResult Element = getDerived().TransformStmt(S->getElement());
   if (Element.isInvalid())
     return SemaRef.StmtError();
   
   // Transform the collection expression.
-  OwningExprResult Collection = getDerived().TransformExpr(S->getCollection());
+  ExprResult Collection = getDerived().TransformExpr(S->getCollection());
   if (Collection.isInvalid())
     return SemaRef.StmtError();
   
   // Transform the body.
-  OwningStmtResult Body = getDerived().TransformStmt(S->getBody());
+  StmtResult Body = getDerived().TransformStmt(S->getBody());
   if (Body.isInvalid())
     return SemaRef.StmtError();
   
@@ -4091,7 +4089,7 @@
 
 
 template<typename Derived>
-Sema::OwningStmtResult
+StmtResult
 TreeTransform<Derived>::TransformCXXCatchStmt(CXXCatchStmt *S) {
   // Transform the exception declaration, if any.
   VarDecl *Var = 0;
@@ -4116,7 +4114,7 @@
   }
 
   // Transform the actual exception handler.
-  OwningStmtResult Handler = getDerived().TransformStmt(S->getHandlerBlock());
+  StmtResult Handler = getDerived().TransformStmt(S->getHandlerBlock());
   if (Handler.isInvalid())
     return SemaRef.StmtError();
 
@@ -4131,10 +4129,10 @@
 }
 
 template<typename Derived>
-Sema::OwningStmtResult
+StmtResult
 TreeTransform<Derived>::TransformCXXTryStmt(CXXTryStmt *S) {
   // Transform the try block itself.
-  OwningStmtResult TryBlock
+  StmtResult TryBlock
     = getDerived().TransformCompoundStmt(S->getTryBlock());
   if (TryBlock.isInvalid())
     return SemaRef.StmtError();
@@ -4143,7 +4141,7 @@
   bool HandlerChanged = false;
   ASTOwningVector<Stmt*> Handlers(SemaRef);
   for (unsigned I = 0, N = S->getNumHandlers(); I != N; ++I) {
-    OwningStmtResult Handler
+    StmtResult Handler
       = getDerived().TransformCXXCatchStmt(S->getHandler(I));
     if (Handler.isInvalid())
       return SemaRef.StmtError();
@@ -4165,13 +4163,13 @@
 // Expression transformation
 //===----------------------------------------------------------------------===//
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformPredefinedExpr(PredefinedExpr *E) {
   return SemaRef.Owned(E->Retain());
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformDeclRefExpr(DeclRefExpr *E) {
   NestedNameSpecifier *Qualifier = 0;
   if (E->getQualifier()) {
@@ -4225,39 +4223,39 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformIntegerLiteral(IntegerLiteral *E) {
   return SemaRef.Owned(E->Retain());
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformFloatingLiteral(FloatingLiteral *E) {
   return SemaRef.Owned(E->Retain());
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformImaginaryLiteral(ImaginaryLiteral *E) {
   return SemaRef.Owned(E->Retain());
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformStringLiteral(StringLiteral *E) {
   return SemaRef.Owned(E->Retain());
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformCharacterLiteral(CharacterLiteral *E) {
   return SemaRef.Owned(E->Retain());
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformParenExpr(ParenExpr *E) {
-  OwningExprResult SubExpr = getDerived().TransformExpr(E->getSubExpr());
+  ExprResult SubExpr = getDerived().TransformExpr(E->getSubExpr());
   if (SubExpr.isInvalid())
     return SemaRef.ExprError();
 
@@ -4269,9 +4267,9 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformUnaryOperator(UnaryOperator *E) {
-  OwningExprResult SubExpr = getDerived().TransformExpr(E->getSubExpr());
+  ExprResult SubExpr = getDerived().TransformExpr(E->getSubExpr());
   if (SubExpr.isInvalid())
     return SemaRef.ExprError();
 
@@ -4284,7 +4282,7 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformOffsetOfExpr(OffsetOfExpr *E) {
   // Transform the type.
   TypeSourceInfo *Type = getDerived().TransformType(E->getTypeSourceInfo());
@@ -4310,7 +4308,7 @@
     switch (ON.getKind()) {
     case Node::Array: {
       Expr *FromIndex = E->getIndexExpr(ON.getArrayExprIndex());
-      OwningExprResult Index = getDerived().TransformExpr(FromIndex);
+      ExprResult Index = getDerived().TransformExpr(FromIndex);
       if (Index.isInvalid())
         return getSema().ExprError();
       
@@ -4350,7 +4348,7 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformSizeOfAlignOfExpr(SizeOfAlignOfExpr *E) {
   if (E->isArgumentType()) {
     TypeSourceInfo *OldT = E->getArgumentTypeInfo();
@@ -4367,7 +4365,7 @@
                                              E->getSourceRange());
   }
 
-  Sema::OwningExprResult SubExpr;
+  ExprResult SubExpr;
   {
     // C++0x [expr.sizeof]p1:
     //   The operand is either an expression, which is an unevaluated operand
@@ -4388,13 +4386,13 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformArraySubscriptExpr(ArraySubscriptExpr *E) {
-  OwningExprResult LHS = getDerived().TransformExpr(E->getLHS());
+  ExprResult LHS = getDerived().TransformExpr(E->getLHS());
   if (LHS.isInvalid())
     return SemaRef.ExprError();
 
-  OwningExprResult RHS = getDerived().TransformExpr(E->getRHS());
+  ExprResult RHS = getDerived().TransformExpr(E->getRHS());
   if (RHS.isInvalid())
     return SemaRef.ExprError();
 
@@ -4411,10 +4409,10 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformCallExpr(CallExpr *E) {
   // Transform the callee.
-  OwningExprResult Callee = getDerived().TransformExpr(E->getCallee());
+  ExprResult Callee = getDerived().TransformExpr(E->getCallee());
   if (Callee.isInvalid())
     return SemaRef.ExprError();
 
@@ -4423,7 +4421,7 @@
   ASTOwningVector<Expr*> Args(SemaRef);
   llvm::SmallVector<SourceLocation, 4> FakeCommaLocs;
   for (unsigned I = 0, N = E->getNumArgs(); I != N; ++I) {
-    OwningExprResult Arg = getDerived().TransformExpr(E->getArg(I));
+    ExprResult Arg = getDerived().TransformExpr(E->getArg(I));
     if (Arg.isInvalid())
       return SemaRef.ExprError();
 
@@ -4450,9 +4448,9 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformMemberExpr(MemberExpr *E) {
-  OwningExprResult Base = getDerived().TransformExpr(E->getBase());
+  ExprResult Base = getDerived().TransformExpr(E->getBase());
   if (Base.isInvalid())
     return SemaRef.ExprError();
 
@@ -4529,13 +4527,13 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformBinaryOperator(BinaryOperator *E) {
-  OwningExprResult LHS = getDerived().TransformExpr(E->getLHS());
+  ExprResult LHS = getDerived().TransformExpr(E->getLHS());
   if (LHS.isInvalid())
     return SemaRef.ExprError();
 
-  OwningExprResult RHS = getDerived().TransformExpr(E->getRHS());
+  ExprResult RHS = getDerived().TransformExpr(E->getRHS());
   if (RHS.isInvalid())
     return SemaRef.ExprError();
 
@@ -4549,24 +4547,24 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformCompoundAssignOperator(
                                                       CompoundAssignOperator *E) {
   return getDerived().TransformBinaryOperator(E);
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformConditionalOperator(ConditionalOperator *E) {
-  OwningExprResult Cond = getDerived().TransformExpr(E->getCond());
+  ExprResult Cond = getDerived().TransformExpr(E->getCond());
   if (Cond.isInvalid())
     return SemaRef.ExprError();
 
-  OwningExprResult LHS = getDerived().TransformExpr(E->getLHS());
+  ExprResult LHS = getDerived().TransformExpr(E->getLHS());
   if (LHS.isInvalid())
     return SemaRef.ExprError();
 
-  OwningExprResult RHS = getDerived().TransformExpr(E->getRHS());
+  ExprResult RHS = getDerived().TransformExpr(E->getRHS());
   if (RHS.isInvalid())
     return SemaRef.ExprError();
 
@@ -4584,7 +4582,7 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformImplicitCastExpr(ImplicitCastExpr *E) {
   // Implicit casts are eliminated during transformation, since they
   // will be recomputed by semantic analysis after transformation.
@@ -4592,7 +4590,7 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformCStyleCastExpr(CStyleCastExpr *E) {
   TypeSourceInfo *OldT;
   TypeSourceInfo *NewT;
@@ -4608,7 +4606,7 @@
       return SemaRef.ExprError();
   }
 
-  OwningExprResult SubExpr
+  ExprResult SubExpr
     = getDerived().TransformExpr(E->getSubExprAsWritten());
   if (SubExpr.isInvalid())
     return SemaRef.ExprError();
@@ -4625,14 +4623,14 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformCompoundLiteralExpr(CompoundLiteralExpr *E) {
   TypeSourceInfo *OldT = E->getTypeSourceInfo();
   TypeSourceInfo *NewT = getDerived().TransformType(OldT);
   if (!NewT)
     return SemaRef.ExprError();
 
-  OwningExprResult Init = getDerived().TransformExpr(E->getInitializer());
+  ExprResult Init = getDerived().TransformExpr(E->getInitializer());
   if (Init.isInvalid())
     return SemaRef.ExprError();
 
@@ -4651,9 +4649,9 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformExtVectorElementExpr(ExtVectorElementExpr *E) {
-  OwningExprResult Base = getDerived().TransformExpr(E->getBase());
+  ExprResult Base = getDerived().TransformExpr(E->getBase());
   if (Base.isInvalid())
     return SemaRef.ExprError();
 
@@ -4670,13 +4668,13 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformInitListExpr(InitListExpr *E) {
   bool InitChanged = false;
 
   ASTOwningVector<Expr*, 4> Inits(SemaRef);
   for (unsigned I = 0, N = E->getNumInits(); I != N; ++I) {
-    OwningExprResult Init = getDerived().TransformExpr(E->getInit(I));
+    ExprResult Init = getDerived().TransformExpr(E->getInit(I));
     if (Init.isInvalid())
       return SemaRef.ExprError();
 
@@ -4692,12 +4690,12 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformDesignatedInitExpr(DesignatedInitExpr *E) {
   Designation Desig;
 
   // transform the initializer value
-  OwningExprResult Init = getDerived().TransformExpr(E->getInit());
+  ExprResult Init = getDerived().TransformExpr(E->getInit());
   if (Init.isInvalid())
     return SemaRef.ExprError();
 
@@ -4715,7 +4713,7 @@
     }
 
     if (D->isArrayDesignator()) {
-      OwningExprResult Index = getDerived().TransformExpr(E->getArrayIndex(*D));
+      ExprResult Index = getDerived().TransformExpr(E->getArrayIndex(*D));
       if (Index.isInvalid())
         return SemaRef.ExprError();
 
@@ -4728,12 +4726,12 @@
     }
 
     assert(D->isArrayRangeDesignator() && "New kind of designator?");
-    OwningExprResult Start
+    ExprResult Start
       = getDerived().TransformExpr(E->getArrayRangeStart(*D));
     if (Start.isInvalid())
       return SemaRef.ExprError();
 
-    OwningExprResult End = getDerived().TransformExpr(E->getArrayRangeEnd(*D));
+    ExprResult End = getDerived().TransformExpr(E->getArrayRangeEnd(*D));
     if (End.isInvalid())
       return SemaRef.ExprError();
 
@@ -4760,7 +4758,7 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformImplicitValueInitExpr(
                                                      ImplicitValueInitExpr *E) {
   TemporaryBase Rebase(*this, E->getLocStart(), DeclarationName());
@@ -4779,13 +4777,13 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformVAArgExpr(VAArgExpr *E) {
   TypeSourceInfo *TInfo = getDerived().TransformType(E->getWrittenTypeInfo());
   if (!TInfo)
     return SemaRef.ExprError();
 
-  OwningExprResult SubExpr = getDerived().TransformExpr(E->getSubExpr());
+  ExprResult SubExpr = getDerived().TransformExpr(E->getSubExpr());
   if (SubExpr.isInvalid())
     return SemaRef.ExprError();
 
@@ -4799,12 +4797,12 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformParenListExpr(ParenListExpr *E) {
   bool ArgumentChanged = false;
   ASTOwningVector<Expr*, 4> Inits(SemaRef);
   for (unsigned I = 0, N = E->getNumExprs(); I != N; ++I) {
-    OwningExprResult Init = getDerived().TransformExpr(E->getExpr(I));
+    ExprResult Init = getDerived().TransformExpr(E->getExpr(I));
     if (Init.isInvalid())
       return SemaRef.ExprError();
 
@@ -4823,16 +4821,16 @@
 /// rebuilds the expression, so that the label identifier can be resolved to
 /// the corresponding label statement by semantic analysis.
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformAddrLabelExpr(AddrLabelExpr *E) {
   return getDerived().RebuildAddrLabelExpr(E->getAmpAmpLoc(), E->getLabelLoc(),
                                            E->getLabel());
 }
 
 template<typename Derived>
-Sema::OwningExprResult 
+ExprResult 
 TreeTransform<Derived>::TransformStmtExpr(StmtExpr *E) {
-  OwningStmtResult SubStmt
+  StmtResult SubStmt
     = getDerived().TransformCompoundStmt(E->getSubStmt(), true);
   if (SubStmt.isInvalid())
     return SemaRef.ExprError();
@@ -4847,7 +4845,7 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformTypesCompatibleExpr(TypesCompatibleExpr *E) {
   TypeSourceInfo *TInfo1;
   TypeSourceInfo *TInfo2;
@@ -4871,17 +4869,17 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformChooseExpr(ChooseExpr *E) {
-  OwningExprResult Cond = getDerived().TransformExpr(E->getCond());
+  ExprResult Cond = getDerived().TransformExpr(E->getCond());
   if (Cond.isInvalid())
     return SemaRef.ExprError();
 
-  OwningExprResult LHS = getDerived().TransformExpr(E->getLHS());
+  ExprResult LHS = getDerived().TransformExpr(E->getLHS());
   if (LHS.isInvalid())
     return SemaRef.ExprError();
 
-  OwningExprResult RHS = getDerived().TransformExpr(E->getRHS());
+  ExprResult RHS = getDerived().TransformExpr(E->getRHS());
   if (RHS.isInvalid())
     return SemaRef.ExprError();
 
@@ -4897,13 +4895,13 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformGNUNullExpr(GNUNullExpr *E) {
   return SemaRef.Owned(E->Retain());
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformCXXOperatorCallExpr(CXXOperatorCallExpr *E) {
   switch (E->getOperator()) {
   case OO_New:
@@ -4918,7 +4916,7 @@
     assert(E->getNumArgs() >= 1 && "Object call is missing arguments");
 
     // Transform the object itself.
-    OwningExprResult Object = getDerived().TransformExpr(E->getArg(0));
+    ExprResult Object = getDerived().TransformExpr(E->getArg(0));
     if (Object.isInvalid())
       return SemaRef.ExprError();
 
@@ -4934,7 +4932,7 @@
       if (getDerived().DropCallArgument(E->getArg(I)))
         break;
       
-      OwningExprResult Arg = getDerived().TransformExpr(E->getArg(I));
+      ExprResult Arg = getDerived().TransformExpr(E->getArg(I));
       if (Arg.isInvalid())
         return SemaRef.ExprError();
 
@@ -4970,15 +4968,15 @@
     return SemaRef.ExprError();
   }
 
-  OwningExprResult Callee = getDerived().TransformExpr(E->getCallee());
+  ExprResult Callee = getDerived().TransformExpr(E->getCallee());
   if (Callee.isInvalid())
     return SemaRef.ExprError();
 
-  OwningExprResult First = getDerived().TransformExpr(E->getArg(0));
+  ExprResult First = getDerived().TransformExpr(E->getArg(0));
   if (First.isInvalid())
     return SemaRef.ExprError();
 
-  OwningExprResult Second;
+  ExprResult Second;
   if (E->getNumArgs() == 2) {
     Second = getDerived().TransformExpr(E->getArg(1));
     if (Second.isInvalid())
@@ -4999,13 +4997,13 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformCXXMemberCallExpr(CXXMemberCallExpr *E) {
   return getDerived().TransformCallExpr(E);
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformCXXNamedCastExpr(CXXNamedCastExpr *E) {
   TypeSourceInfo *OldT;
   TypeSourceInfo *NewT;
@@ -5021,7 +5019,7 @@
       return SemaRef.ExprError();
   }
 
-  OwningExprResult SubExpr
+  ExprResult SubExpr
     = getDerived().TransformExpr(E->getSubExprAsWritten());
   if (SubExpr.isInvalid())
     return SemaRef.ExprError();
@@ -5049,32 +5047,32 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformCXXStaticCastExpr(CXXStaticCastExpr *E) {
   return getDerived().TransformCXXNamedCastExpr(E);
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformCXXDynamicCastExpr(CXXDynamicCastExpr *E) {
   return getDerived().TransformCXXNamedCastExpr(E);
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformCXXReinterpretCastExpr(
                                                       CXXReinterpretCastExpr *E) {
   return getDerived().TransformCXXNamedCastExpr(E);
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformCXXConstCastExpr(CXXConstCastExpr *E) {
   return getDerived().TransformCXXNamedCastExpr(E);
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformCXXFunctionalCastExpr(
                                                      CXXFunctionalCastExpr *E) {
   TypeSourceInfo *OldT;
@@ -5088,7 +5086,7 @@
       return SemaRef.ExprError();
   }
 
-  OwningExprResult SubExpr
+  ExprResult SubExpr
     = getDerived().TransformExpr(E->getSubExprAsWritten());
   if (SubExpr.isInvalid())
     return SemaRef.ExprError();
@@ -5108,7 +5106,7 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformCXXTypeidExpr(CXXTypeidExpr *E) {
   if (E->isTypeOperand()) {
     TypeSourceInfo *TInfo
@@ -5132,7 +5130,7 @@
   EnterExpressionEvaluationContext Unevaluated(SemaRef,
                                       Action::PotentiallyPotentiallyEvaluated);
 
-  OwningExprResult SubExpr = getDerived().TransformExpr(E->getExprOperand());
+  ExprResult SubExpr = getDerived().TransformExpr(E->getExprOperand());
   if (SubExpr.isInvalid())
     return SemaRef.ExprError();
 
@@ -5147,20 +5145,20 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformCXXBoolLiteralExpr(CXXBoolLiteralExpr *E) {
   return SemaRef.Owned(E->Retain());
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformCXXNullPtrLiteralExpr(
                                                      CXXNullPtrLiteralExpr *E) {
   return SemaRef.Owned(E->Retain());
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformCXXThisExpr(CXXThisExpr *E) {
   TemporaryBase Rebase(*this, E->getLocStart(), DeclarationName());
 
@@ -5176,9 +5174,9 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformCXXThrowExpr(CXXThrowExpr *E) {
-  OwningExprResult SubExpr = getDerived().TransformExpr(E->getSubExpr());
+  ExprResult SubExpr = getDerived().TransformExpr(E->getSubExpr());
   if (SubExpr.isInvalid())
     return SemaRef.ExprError();
 
@@ -5190,7 +5188,7 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformCXXDefaultArgExpr(CXXDefaultArgExpr *E) {
   ParmVarDecl *Param
     = cast_or_null<ParmVarDecl>(getDerived().TransformDecl(E->getLocStart(),
@@ -5206,7 +5204,7 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformCXXScalarValueInitExpr(CXXScalarValueInitExpr *E) {
   TemporaryBase Rebase(*this, E->getTypeBeginLoc(), DeclarationName());
 
@@ -5225,7 +5223,7 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformCXXNewExpr(CXXNewExpr *E) {
   // Transform the type that we're allocating
   TemporaryBase Rebase(*this, E->getLocStart(), DeclarationName());
@@ -5234,7 +5232,7 @@
     return SemaRef.ExprError();
 
   // Transform the size of the array we're allocating (if any).
-  OwningExprResult ArraySize = getDerived().TransformExpr(E->getArraySize());
+  ExprResult ArraySize = getDerived().TransformExpr(E->getArraySize());
   if (ArraySize.isInvalid())
     return SemaRef.ExprError();
 
@@ -5242,7 +5240,7 @@
   bool ArgumentChanged = false;
   ASTOwningVector<Expr*> PlacementArgs(SemaRef);
   for (unsigned I = 0, N = E->getNumPlacementArgs(); I != N; ++I) {
-    OwningExprResult Arg = getDerived().TransformExpr(E->getPlacementArg(I));
+    ExprResult Arg = getDerived().TransformExpr(E->getPlacementArg(I));
     if (Arg.isInvalid())
       return SemaRef.ExprError();
 
@@ -5256,7 +5254,7 @@
     if (getDerived().DropCallArgument(E->getConstructorArg(I)))
       break;
     
-    OwningExprResult Arg = getDerived().TransformExpr(E->getConstructorArg(I));
+    ExprResult Arg = getDerived().TransformExpr(E->getConstructorArg(I));
     if (Arg.isInvalid())
       return SemaRef.ExprError();
 
@@ -5351,9 +5349,9 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformCXXDeleteExpr(CXXDeleteExpr *E) {
-  OwningExprResult Operand = getDerived().TransformExpr(E->getArgument());
+  ExprResult Operand = getDerived().TransformExpr(E->getArgument());
   if (Operand.isInvalid())
     return SemaRef.ExprError();
 
@@ -5384,10 +5382,10 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformCXXPseudoDestructorExpr(
                                                      CXXPseudoDestructorExpr *E) {
-  OwningExprResult Base = getDerived().TransformExpr(E->getBase());
+  ExprResult Base = getDerived().TransformExpr(E->getBase());
   if (Base.isInvalid())
     return SemaRef.ExprError();
 
@@ -5463,7 +5461,7 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformUnresolvedLookupExpr(
                                                   UnresolvedLookupExpr *Old) {
   TemporaryBase Rebase(*this, Old->getNameLoc(), DeclarationName());
@@ -5545,7 +5543,7 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformUnaryTypeTraitExpr(UnaryTypeTraitExpr *E) {
   TemporaryBase Rebase(*this, /*FIXME*/E->getLocStart(), DeclarationName());
 
@@ -5569,7 +5567,7 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformDependentScopeDeclRefExpr(
                                                DependentScopeDeclRefExpr *E) {
   NestedNameSpecifier *NNS
@@ -5612,7 +5610,7 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformCXXConstructExpr(CXXConstructExpr *E) {
   // CXXConstructExprs are always implicit, so when we have a
   // 1-argument construction we just transform that argument.
@@ -5643,7 +5641,7 @@
       break;
     }
 
-    OwningExprResult TransArg = getDerived().TransformExpr(*Arg);
+    ExprResult TransArg = getDerived().TransformExpr(*Arg);
     if (TransArg.isInvalid())
       return SemaRef.ExprError();
 
@@ -5673,7 +5671,7 @@
 /// Since CXXBindTemporaryExpr nodes are implicitly generated, we just
 /// transform the subexpression and return that.
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformCXXBindTemporaryExpr(CXXBindTemporaryExpr *E) {
   return getDerived().TransformExpr(E->getSubExpr());
 }
@@ -5683,7 +5681,7 @@
 /// Since CXXBindReferenceExpr nodes are implicitly generated, we just
 /// transform the subexpression and return that.
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformCXXBindReferenceExpr(CXXBindReferenceExpr *E) {
   return getDerived().TransformExpr(E->getSubExpr());
 }
@@ -5694,14 +5692,14 @@
 /// Since CXXExprWithTemporaries nodes are implicitly generated, we
 /// just transform the subexpression and return that.
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformCXXExprWithTemporaries(
                                                     CXXExprWithTemporaries *E) {
   return getDerived().TransformExpr(E->getSubExpr());
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformCXXTemporaryObjectExpr(
                                                       CXXTemporaryObjectExpr *E) {
   TemporaryBase Rebase(*this, E->getTypeBeginLoc(), DeclarationName());
@@ -5727,7 +5725,7 @@
       break;
     }
 
-    OwningExprResult TransArg = getDerived().TransformExpr(*Arg);
+    ExprResult TransArg = getDerived().TransformExpr(*Arg);
     if (TransArg.isInvalid())
       return SemaRef.ExprError();
 
@@ -5760,7 +5758,7 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformCXXUnresolvedConstructExpr(
                                                   CXXUnresolvedConstructExpr *E) {
   TemporaryBase Rebase(*this, E->getTypeBeginLoc(), DeclarationName());
@@ -5774,7 +5772,7 @@
   for (CXXUnresolvedConstructExpr::arg_iterator Arg = E->arg_begin(),
                                              ArgEnd = E->arg_end();
        Arg != ArgEnd; ++Arg) {
-    OwningExprResult TransArg = getDerived().TransformExpr(*Arg);
+    ExprResult TransArg = getDerived().TransformExpr(*Arg);
     if (TransArg.isInvalid())
       return SemaRef.ExprError();
 
@@ -5799,11 +5797,11 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformCXXDependentScopeMemberExpr(
                                              CXXDependentScopeMemberExpr *E) {
   // Transform the base of the expression.
-  OwningExprResult Base((Expr*) 0);
+  ExprResult Base((Expr*) 0);
   Expr *OldBase;
   QualType BaseType;
   QualType ObjectType;
@@ -5897,10 +5895,10 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformUnresolvedMemberExpr(UnresolvedMemberExpr *Old) {
   // Transform the base of the expression.
-  OwningExprResult Base((Expr*) 0);
+  ExprResult Base((Expr*) 0);
   QualType BaseType;
   if (!Old->isImplicitAccess()) {
     Base = getDerived().TransformExpr(Old->getBase());
@@ -5996,13 +5994,13 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformObjCStringLiteral(ObjCStringLiteral *E) {
   return SemaRef.Owned(E->Retain());
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformObjCEncodeExpr(ObjCEncodeExpr *E) {
   TypeSourceInfo *EncodedTypeInfo
     = getDerived().TransformType(E->getEncodedTypeSourceInfo());
@@ -6019,13 +6017,13 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformObjCMessageExpr(ObjCMessageExpr *E) {
   // Transform arguments.
   bool ArgChanged = false;
   ASTOwningVector<Expr*> Args(SemaRef);
   for (unsigned I = 0, N = E->getNumArgs(); I != N; ++I) {
-    OwningExprResult Arg = getDerived().TransformExpr(E->getArg(I));
+    ExprResult Arg = getDerived().TransformExpr(E->getArg(I));
     if (Arg.isInvalid())
       return SemaRef.ExprError();
     
@@ -6057,7 +6055,7 @@
   // Instance message: transform the receiver
   assert(E->getReceiverKind() == ObjCMessageExpr::Instance &&
          "Only class and instance messages may be instantiated");
-  OwningExprResult Receiver
+  ExprResult Receiver
     = getDerived().TransformExpr(E->getInstanceReceiver());
   if (Receiver.isInvalid())
     return SemaRef.ExprError();
@@ -6077,22 +6075,22 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformObjCSelectorExpr(ObjCSelectorExpr *E) {
   return SemaRef.Owned(E->Retain());
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformObjCProtocolExpr(ObjCProtocolExpr *E) {
   return SemaRef.Owned(E->Retain());
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformObjCIvarRefExpr(ObjCIvarRefExpr *E) {
   // Transform the base expression.
-  OwningExprResult Base = getDerived().TransformExpr(E->getBase());
+  ExprResult Base = getDerived().TransformExpr(E->getBase());
   if (Base.isInvalid())
     return SemaRef.ExprError();
 
@@ -6109,10 +6107,10 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformObjCPropertyRefExpr(ObjCPropertyRefExpr *E) {
   // Transform the base expression.
-  OwningExprResult Base = getDerived().TransformExpr(E->getBase());
+  ExprResult Base = getDerived().TransformExpr(E->getBase());
   if (Base.isInvalid())
     return SemaRef.ExprError();
   
@@ -6128,7 +6126,7 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformObjCImplicitSetterGetterRefExpr(
                                           ObjCImplicitSetterGetterRefExpr *E) {
   // If this implicit setter/getter refers to class methods, it cannot have any
@@ -6137,7 +6135,7 @@
     return SemaRef.Owned(E->Retain());
   
   // Transform the base expression.
-  OwningExprResult Base = getDerived().TransformExpr(E->getBase());
+  ExprResult Base = getDerived().TransformExpr(E->getBase());
   if (Base.isInvalid())
     return SemaRef.ExprError();
   
@@ -6158,17 +6156,17 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformObjCSuperExpr(ObjCSuperExpr *E) {
   // Can never occur in a dependent context.
   return SemaRef.Owned(E->Retain());
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformObjCIsaExpr(ObjCIsaExpr *E) {
   // Transform the base expression.
-  OwningExprResult Base = getDerived().TransformExpr(E->getBase());
+  ExprResult Base = getDerived().TransformExpr(E->getBase());
   if (Base.isInvalid())
     return SemaRef.ExprError();
   
@@ -6182,12 +6180,12 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformShuffleVectorExpr(ShuffleVectorExpr *E) {
   bool ArgumentChanged = false;
   ASTOwningVector<Expr*> SubExprs(SemaRef);
   for (unsigned I = 0, N = E->getNumSubExprs(); I != N; ++I) {
-    OwningExprResult SubExpr = getDerived().TransformExpr(E->getExpr(I));
+    ExprResult SubExpr = getDerived().TransformExpr(E->getExpr(I));
     if (SubExpr.isInvalid())
       return SemaRef.ExprError();
 
@@ -6205,7 +6203,7 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformBlockExpr(BlockExpr *E) {
   SourceLocation CaretLoc(E->getExprLoc());
   
@@ -6236,7 +6234,7 @@
   }
     
   // Transform the body
-  OwningStmtResult Body = getDerived().TransformStmt(E->getBody());
+  StmtResult Body = getDerived().TransformStmt(E->getBody());
   if (Body.isInvalid())
     return SemaRef.ExprError();
   // Set the parameters on the block decl.
@@ -6256,7 +6254,7 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::TransformBlockDeclRefExpr(BlockDeclRefExpr *E) {
   NestedNameSpecifier *Qualifier = 0;
     
@@ -6586,7 +6584,7 @@
 }
   
 template<typename Derived>
-Sema::OwningExprResult
+ExprResult
 TreeTransform<Derived>::RebuildCXXOperatorCallExpr(OverloadedOperatorKind Op,
                                                    SourceLocation OpLoc,
                                                    Expr *OrigCallee,
@@ -6620,7 +6618,7 @@
       // Neither of the arguments is an overloadable type, so try to
       // create a built-in binary operation.
       BinaryOperator::Opcode Opc = BinaryOperator::getOverloadedOpcode(Op);
-      OwningExprResult Result
+      ExprResult Result
         = SemaRef.CreateBuiltinBinOp(OpLoc, Opc, First, Second);
       if (Result.isInvalid())
         return SemaRef.ExprError();
@@ -6663,7 +6661,7 @@
   // Create the overloaded operator invocation for binary operators.
   BinaryOperator::Opcode Opc =
     BinaryOperator::getOverloadedOpcode(Op);
-  OwningExprResult Result
+  ExprResult Result
     = SemaRef.CreateOverloadedBinOp(OpLoc, Opc, Functions, Args[0], Args[1]);
   if (Result.isInvalid())
     return SemaRef.ExprError();
@@ -6672,7 +6670,7 @@
 }
 
 template<typename Derived>
-Sema::OwningExprResult 
+ExprResult 
 TreeTransform<Derived>::RebuildCXXPseudoDestructorExpr(Expr *Base,
                                                      SourceLocation OperatorLoc,
                                                        bool isArrow,





More information about the cfe-commits mailing list