Convert a few expression actions to smart pointers.
These actions are extremely widely used (identifier expressions and literals); still no performance regression.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62468 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp
index 0295f70..c8c521d 100644
--- a/lib/Parse/ParseExpr.cpp
+++ b/lib/Parse/ParseExpr.cpp
@@ -1119,7 +1119,7 @@
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 @@
} 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.