diff options
Diffstat (limited to 'lib/Parse')
-rw-r--r-- | lib/Parse/ParseDecl.cpp | 2 | ||||
-rw-r--r-- | lib/Parse/ParseExpr.cpp | 4 | ||||
-rw-r--r-- | lib/Parse/ParseExprCXX.cpp | 13 |
3 files changed, 9 insertions, 10 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index 319c03eecf..456acbeebd 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/lib/Parse/ParseDecl.cpp @@ -2105,7 +2105,7 @@ void Parser::ParseBracketDeclarator(Declarator &D) { } 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, Actions.ActOnNumericConstant(Tok)); + OwningExprResult ExprRes(Actions.ActOnNumericConstant(Tok)); ConsumeToken(); MatchRHSPunctuation(tok::r_square, StartLoc); diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp index 0295f70633..c8c521d6aa 100644 --- a/lib/Parse/ParseExpr.cpp +++ b/lib/Parse/ParseExpr.cpp @@ -1119,7 +1119,7 @@ Parser::ParseParenExpression(ParenParseOption &ExprType, ExprType = SimpleExpr; if (!Result.isInvalid() && Tok.is(tok::r_paren)) Result = Actions.ActOnParenExpr(OpenLoc, Tok.getLocation(), - Result.release()); + move_arg(Result)); } // Match the ')'. @@ -1155,7 +1155,7 @@ Parser::OwningExprResult Parser::ParseStringLiteralExpression() { } while (isTokenStringLiteral()); // Pass the set of string tokens, ready for concatenation, to the actions. - return Owned(Actions.ActOnStringLiteral(&StringToks[0], StringToks.size())); + return Actions.ActOnStringLiteral(&StringToks[0], StringToks.size()); } /// ParseExpressionList - Used for C/C++ (argument-)expression-list. diff --git a/lib/Parse/ParseExprCXX.cpp b/lib/Parse/ParseExprCXX.cpp index d05c00292d..04e53a94ef 100644 --- a/lib/Parse/ParseExprCXX.cpp +++ b/lib/Parse/ParseExprCXX.cpp @@ -154,19 +154,18 @@ Parser::OwningExprResult Parser::ParseCXXIdExpression() { // Consume the identifier so that we can see if it is followed by a '('. IdentifierInfo &II = *Tok.getIdentifierInfo(); SourceLocation L = ConsumeToken(); - return Owned(Actions.ActOnIdentifierExpr(CurScope, L, II, - Tok.is(tok::l_paren), &SS)); + return Actions.ActOnIdentifierExpr(CurScope, L, II, + Tok.is(tok::l_paren), &SS); } case tok::kw_operator: { SourceLocation OperatorLoc = Tok.getLocation(); if (OverloadedOperatorKind Op = TryParseOperatorFunctionId()) - return Owned(Actions.ActOnCXXOperatorFunctionIdExpr( - CurScope, OperatorLoc, Op, Tok.is(tok::l_paren), SS)); + return Actions.ActOnCXXOperatorFunctionIdExpr( + CurScope, OperatorLoc, Op, Tok.is(tok::l_paren), SS); if (TypeTy *Type = ParseConversionFunctionId()) - return Owned(Actions.ActOnCXXConversionFunctionExpr(CurScope, OperatorLoc, - Type, - Tok.is(tok::l_paren), SS)); + return Actions.ActOnCXXConversionFunctionExpr(CurScope, OperatorLoc, Type, + Tok.is(tok::l_paren), SS); // We already complained about a bad conversion-function-id, // above. |