diff options
author | dim <dim@FreeBSD.org> | 2012-12-02 13:20:44 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-12-02 13:20:44 +0000 |
commit | 056abd2059c65a3e908193aeae16fad98017437c (patch) | |
tree | 2732d02d7d51218d6eed98ac7fcfc5b8794896b5 /lib/Parse/ParseInit.cpp | |
parent | cc73504950eb7b5dff2dded9bedd67bc36d64641 (diff) | |
download | FreeBSD-src-056abd2059c65a3e908193aeae16fad98017437c.zip FreeBSD-src-056abd2059c65a3e908193aeae16fad98017437c.tar.gz |
Vendor import of clang release_32 branch r168974 (effectively, 3.2 RC2):
http://llvm.org/svn/llvm-project/cfe/branches/release_32@168974
Diffstat (limited to 'lib/Parse/ParseInit.cpp')
-rw-r--r-- | lib/Parse/ParseInit.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/Parse/ParseInit.cpp b/lib/Parse/ParseInit.cpp index 1c349fd..e47fd9b 100644 --- a/lib/Parse/ParseInit.cpp +++ b/lib/Parse/ParseInit.cpp @@ -313,7 +313,7 @@ ExprResult Parser::ParseInitializerWithPotentialDesignator() { Idx = ParseAssignmentExpression(); if (Idx.isInvalid()) { SkipUntil(tok::r_square); - return move(Idx); + return Idx; } } @@ -341,7 +341,7 @@ ExprResult Parser::ParseInitializerWithPotentialDesignator() { ExprResult RHS(ParseConstantExpression()); if (RHS.isInvalid()) { SkipUntil(tok::r_square); - return move(RHS); + return RHS; } Desig.AddDesignator(Designator::getArrayRange(Idx.release(), RHS.release(), @@ -405,15 +405,14 @@ ExprResult Parser::ParseBraceInitializer() { /// InitExprs - This is the actual list of expressions contained in the /// initializer. - ExprVector InitExprs(Actions); + ExprVector InitExprs; if (Tok.is(tok::r_brace)) { // Empty initializers are a C++ feature and a GNU extension to C. if (!getLangOpts().CPlusPlus) Diag(LBraceLoc, diag::ext_gnu_empty_initializer); // Match the '}'. - return Actions.ActOnInitList(LBraceLoc, MultiExprArg(Actions), - ConsumeBrace()); + return Actions.ActOnInitList(LBraceLoc, MultiExprArg(), ConsumeBrace()); } bool InitExprsOk = true; @@ -476,7 +475,7 @@ ExprResult Parser::ParseBraceInitializer() { bool closed = !T.consumeClose(); if (InitExprsOk && closed) - return Actions.ActOnInitList(LBraceLoc, move_arg(InitExprs), + return Actions.ActOnInitList(LBraceLoc, InitExprs, T.getCloseLocation()); return ExprError(); // an error occurred. |