diff options
Diffstat (limited to 'lib/Sema/TreeTransform.h')
-rw-r--r-- | lib/Sema/TreeTransform.h | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/lib/Sema/TreeTransform.h b/lib/Sema/TreeTransform.h index ec02661218..3b41f758d9 100644 --- a/lib/Sema/TreeTransform.h +++ b/lib/Sema/TreeTransform.h @@ -1267,16 +1267,6 @@ public: return getSema().ActOnObjCAutoreleasePoolStmt(AtLoc, Body); } - /// \brief Build the collection operand to a new Objective-C fast - /// enumeration statement. - /// - /// By default, performs semantic analysis to build the new statement. - /// Subclasses may override this routine to provide different behavior. - ExprResult RebuildObjCForCollectionOperand(SourceLocation forLoc, - Expr *collection) { - return getSema().ActOnObjCForCollectionOperand(forLoc, collection); - } - /// \brief Build a new Objective-C fast enumeration statement. /// /// By default, performs semantic analysis to build the new statement. @@ -1287,11 +1277,14 @@ public: Expr *Collection, SourceLocation RParenLoc, Stmt *Body) { - return getSema().ActOnObjCForCollectionStmt(ForLoc, LParenLoc, - Element, + StmtResult ForEachStmt = getSema().ActOnObjCForCollectionStmt(ForLoc, LParenLoc, + Element, Collection, - RParenLoc, - Body); + RParenLoc); + if (ForEachStmt.isInvalid()) + return StmtError(); + + return getSema().FinishObjCForCollectionStmt(ForEachStmt.take(), Body); } /// \brief Build a new C++ exception declaration. @@ -5791,10 +5784,6 @@ TreeTransform<Derived>::TransformObjCForCollectionStmt( ExprResult Collection = getDerived().TransformExpr(S->getCollection()); if (Collection.isInvalid()) return StmtError(); - Collection = getDerived().RebuildObjCForCollectionOperand(S->getForLoc(), - Collection.take()); - if (Collection.isInvalid()) - return StmtError(); // Transform the body. StmtResult Body = getDerived().TransformStmt(S->getBody()); |