[cfe-commits] r171269 - in /cfe/trunk: include/clang/Parse/Parser.h lib/Parse/ParseObjc.cpp
Nico Weber
nicolasweber at gmx.de
Sun Dec 30 16:28:03 PST 2012
Author: nico
Date: Sun Dec 30 18:28:03 2012
New Revision: 171269
URL: http://llvm.org/viewvc/llvm-project?rev=171269&view=rev
Log:
Remove some remnants of OwningExprResult / OwningStmtResult.
These got deleted late 2010 during the Actions/Sema unification.
No functionality change.
Modified:
cfe/trunk/include/clang/Parse/Parser.h
cfe/trunk/lib/Parse/ParseObjc.cpp
Modified: cfe/trunk/include/clang/Parse/Parser.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/Parser.h?rev=171269&r1=171268&r2=171269&view=diff
==============================================================================
--- cfe/trunk/include/clang/Parse/Parser.h (original)
+++ cfe/trunk/include/clang/Parse/Parser.h Sun Dec 30 18:28:03 2012
@@ -223,15 +223,6 @@
typedef llvm::MutableArrayRef<Stmt*> MultiStmtArg;
typedef Sema::FullExprArg FullExprArg;
- /// 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 StmtResult
- StmtResult Owned(StmtResult res) {
- return StmtResult(res);
- }
-
ExprResult ExprError() { return ExprResult(true); }
StmtResult StmtError() { return StmtResult(true); }
Modified: cfe/trunk/lib/Parse/ParseObjc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseObjc.cpp?rev=171269&r1=171268&r2=171269&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseObjc.cpp (original)
+++ cfe/trunk/lib/Parse/ParseObjc.cpp Sun Dec 30 18:28:03 2012
@@ -2589,8 +2589,8 @@
AtStrings.push_back(Lit.release());
}
- return Owned(Actions.ParseObjCStringLiteral(&AtLocs[0], AtStrings.data(),
- AtStrings.size()));
+ return Actions.ParseObjCStringLiteral(&AtLocs[0], AtStrings.data(),
+ AtStrings.size());
}
/// ParseObjCBooleanLiteral -
@@ -2613,7 +2613,7 @@
return Lit;
}
ConsumeToken(); // Consume the literal token.
- return Owned(Actions.BuildObjCNumericLiteral(AtLoc, Lit.take()));
+ return Actions.BuildObjCNumericLiteral(AtLoc, Lit.take());
}
/// ParseObjCNumericLiteral -
@@ -2627,7 +2627,7 @@
return Lit;
}
ConsumeToken(); // Consume the literal token.
- return Owned(Actions.BuildObjCNumericLiteral(AtLoc, Lit.take()));
+ return Actions.BuildObjCNumericLiteral(AtLoc, Lit.take());
}
/// ParseObjCBoxedExpr -
@@ -2651,8 +2651,8 @@
// a boxed expression from a literal.
SourceLocation LPLoc = T.getOpenLocation(), RPLoc = T.getCloseLocation();
ValueExpr = Actions.ActOnParenExpr(LPLoc, RPLoc, ValueExpr.take());
- return Owned(Actions.BuildObjCBoxedExpr(SourceRange(AtLoc, RPLoc),
- ValueExpr.take()));
+ return Actions.BuildObjCBoxedExpr(SourceRange(AtLoc, RPLoc),
+ ValueExpr.take());
}
ExprResult Parser::ParseObjCArrayLiteral(SourceLocation AtLoc) {
@@ -2685,7 +2685,7 @@
}
SourceLocation EndLoc = ConsumeBracket(); // location of ']'
MultiExprArg Args(ElementExprs);
- return Owned(Actions.BuildObjCArrayLiteral(SourceRange(AtLoc, EndLoc), Args));
+ return Actions.BuildObjCArrayLiteral(SourceRange(AtLoc, EndLoc), Args);
}
ExprResult Parser::ParseObjCDictionaryLiteral(SourceLocation AtLoc) {
@@ -2741,9 +2741,8 @@
SourceLocation EndLoc = ConsumeBrace();
// Create the ObjCDictionaryLiteral.
- return Owned(Actions.BuildObjCDictionaryLiteral(SourceRange(AtLoc, EndLoc),
- Elements.data(),
- Elements.size()));
+ return Actions.BuildObjCDictionaryLiteral(SourceRange(AtLoc, EndLoc),
+ Elements.data(), Elements.size());
}
/// objc-encode-expression:
@@ -2767,9 +2766,8 @@
if (Ty.isInvalid())
return ExprError();
- return Owned(Actions.ParseObjCEncodeExpression(AtLoc, EncLoc,
- T.getOpenLocation(), Ty.get(),
- T.getCloseLocation()));
+ return Actions.ParseObjCEncodeExpression(AtLoc, EncLoc, T.getOpenLocation(),
+ Ty.get(), T.getCloseLocation());
}
/// objc-protocol-expression
@@ -2792,10 +2790,9 @@
T.consumeClose();
- return Owned(Actions.ParseObjCProtocolExpression(protocolId, AtLoc, ProtoLoc,
- T.getOpenLocation(),
- ProtoIdLoc,
- T.getCloseLocation()));
+ return Actions.ParseObjCProtocolExpression(protocolId, AtLoc, ProtoLoc,
+ T.getOpenLocation(), ProtoIdLoc,
+ T.getCloseLocation());
}
/// objc-selector-expression
@@ -2856,9 +2853,9 @@
}
T.consumeClose();
Selector Sel = PP.getSelectorTable().getSelector(nColons, &KeyIdents[0]);
- return Owned(Actions.ParseObjCSelectorExpression(Sel, AtLoc, SelectorLoc,
- T.getOpenLocation(),
- T.getCloseLocation()));
+ return Actions.ParseObjCSelectorExpression(Sel, AtLoc, SelectorLoc,
+ T.getOpenLocation(),
+ T.getCloseLocation());
}
void Parser::ParseLexedObjCMethodDefs(LexedMethod &LM, bool parseMethod) {
More information about the cfe-commits
mailing list