diff options
author | John McCall <rjmccall@apple.com> | 2010-08-24 06:29:42 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-08-24 06:29:42 +0000 |
commit | 60d7b3a319d84d688752be3870615ac0f111fb16 (patch) | |
tree | d6ff6a3cd161c984a956e3016ce2aa0b93bdf680 | |
parent | 182f7093dd9dabbcf6df44b4ae004ead38804b48 (diff) |
OwningExprResult -> ExprResult. This patch brought to you by
M-x query-replace-regexp
\(Sema::\|Action::\|Parser::\|\)Owning\(Expr\|Stmt\)Result -> \2Result
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111903 91177308-0d34-0410-b5e6-96231b3b80d8
32 files changed, 1109 insertions, 1126 deletions
diff --git a/include/clang/Parse/Parser.h b/include/clang/Parse/Parser.h index ae0ec5e46c..cc82c0b0a5 100644 --- a/include/clang/Parse/Parser.h +++ b/include/clang/Parse/Parser.h @@ -163,29 +163,26 @@ public: 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 @@ private: 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 @@ private: //===--------------------------------------------------------------------===// // 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 @@ private: 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 @@ private: //===--------------------------------------------------------------------===// // 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 @@ private: //===--------------------------------------------------------------------===// // 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 @@ private: 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 @@ private: /// 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 @@ private: //===--------------------------------------------------------------------===// // 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 @@ private: //===--------------------------------------------------------------------===// // 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 @@ private: 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 @@ private: //===--------------------------------------------------------------------===// // GNU G++: Type Traits [Type-Traits.html in the GCC manual] - OwningExprResult ParseUnaryTypeTrait(); + ExprResult ParseUnaryTypeTrait(); }; } // end namespace clang diff --git a/include/clang/Sema/Action.h b/include/clang/Sema/Action.h index 19bb76eaea..1d3d460b41 100644 --- a/include/clang/Sema/Action.h +++ b/include/clang/Sema/Action.h @@ -99,12 +99,6 @@ public: 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 @@ public: // emulation code from Ownership.h). FullExprArg(const FullExprArg& Other): E(Other.E) {} - OwningExprResult release() { + ExprResult release() { return move(E); } @@ -149,14 +143,14 @@ public: // 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 @@ public: // 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 @@ public: 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 @@ public: /// 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 @@ public: /// \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 @@ public: /// /// \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 @@ public: /// 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 @@ public: /// \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 @@ public: 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 @@ public: /// 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 @@ public: /// \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 @@ public: /// \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 @@ public: 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 @@ public: /// \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 @@ public: 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 @@ public: } // 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 @@ public: /// /// \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 @@ public: /// This provid |