Removed unused LParenLoc parameter to ActOnCXXForRangeStmt

llvm-svn: 162048
This commit is contained in:
Sam Panzer 2012-08-16 21:47:25 +00:00
parent adc43c998c
commit 2c4ca0fa7d
4 changed files with 8 additions and 15 deletions

View File

@ -2498,13 +2498,11 @@ public:
ExprResult CheckObjCForCollectionOperand(SourceLocation forLoc,
Expr *collection);
StmtResult ActOnObjCForCollectionStmt(SourceLocation ForColLoc,
SourceLocation LParenLoc,
Stmt *First, Expr *collection,
SourceLocation RParenLoc);
StmtResult FinishObjCForCollectionStmt(Stmt *ForCollection, Stmt *Body);
StmtResult ActOnCXXForRangeStmt(SourceLocation ForLoc,
SourceLocation LParenLoc, Stmt *LoopVar,
StmtResult ActOnCXXForRangeStmt(SourceLocation ForLoc, Stmt *LoopVar,
SourceLocation ColonLoc, Expr *Collection,
SourceLocation RParenLoc);
StmtResult BuildCXXForRangeStmt(SourceLocation ForLoc,

View File

@ -1495,8 +1495,7 @@ StmtResult Parser::ParseForStatement(SourceLocation *TrailingElseLoc) {
StmtResult ForEachStmt;
if (ForRange) {
ForRangeStmt = Actions.ActOnCXXForRangeStmt(ForLoc, T.getOpenLocation(),
FirstPart.take(),
ForRangeStmt = Actions.ActOnCXXForRangeStmt(ForLoc, FirstPart.take(),
ForRangeInit.ColonLoc,
ForRangeInit.RangeExpr.get(),
T.getCloseLocation());
@ -1505,7 +1504,7 @@ StmtResult Parser::ParseForStatement(SourceLocation *TrailingElseLoc) {
// Similarly, we need to do the semantic analysis for a for-range
// statement immediately in order to close over temporaries correctly.
} else if (ForEach) {
ForEachStmt = Actions.ActOnObjCForCollectionStmt(ForLoc, T.getOpenLocation(),
ForEachStmt = Actions.ActOnObjCForCollectionStmt(ForLoc,
FirstPart.take(),
Collection.take(),
T.getCloseLocation());

View File

@ -1521,7 +1521,6 @@ Sema::CheckObjCForCollectionOperand(SourceLocation forLoc, Expr *collection) {
StmtResult
Sema::ActOnObjCForCollectionStmt(SourceLocation ForLoc,
SourceLocation LParenLoc,
Stmt *First, Expr *collection,
SourceLocation RParenLoc) {
@ -1703,9 +1702,9 @@ static bool ObjCEnumerationCollection(Expr *Collection) {
&& Collection->getType()->getAs<ObjCObjectPointerType>() != 0;
}
/// ActOnCXXForRangeStmt - Check and build a C++0x for-range statement.
/// ActOnCXXForRangeStmt - Check and build a C++11 for-range statement.
///
/// C++0x [stmt.ranged]:
/// C++11 [stmt.ranged]:
/// A range-based for statement is equivalent to
///
/// {
@ -1722,15 +1721,14 @@ static bool ObjCEnumerationCollection(Expr *Collection) {
/// The body of the loop is not available yet, since it cannot be analysed until
/// we have determined the type of the for-range-declaration.
StmtResult
Sema::ActOnCXXForRangeStmt(SourceLocation ForLoc, SourceLocation LParenLoc,
Sema::ActOnCXXForRangeStmt(SourceLocation ForLoc,
Stmt *First, SourceLocation ColonLoc, Expr *Range,
SourceLocation RParenLoc) {
if (!First || !Range)
return StmtError();
if (ObjCEnumerationCollection(Range))
return ActOnObjCForCollectionStmt(ForLoc, LParenLoc, First, Range,
RParenLoc);
return ActOnObjCForCollectionStmt(ForLoc, First, Range, RParenLoc);
DeclStmt *DS = dyn_cast<DeclStmt>(First);
assert(DS && "first part of for range not a decl stmt");

View File

@ -1277,12 +1277,11 @@ public:
/// By default, performs semantic analysis to build the new statement.
/// Subclasses may override this routine to provide different behavior.
StmtResult RebuildObjCForCollectionStmt(SourceLocation ForLoc,
SourceLocation LParenLoc,
Stmt *Element,
Expr *Collection,
SourceLocation RParenLoc,
Stmt *Body) {
StmtResult ForEachStmt = getSema().ActOnObjCForCollectionStmt(ForLoc, LParenLoc,
StmtResult ForEachStmt = getSema().ActOnObjCForCollectionStmt(ForLoc,
Element,
Collection,
RParenLoc);
@ -5803,7 +5802,6 @@ TreeTransform<Derived>::TransformObjCForCollectionStmt(
// Build a new statement.
return getDerived().RebuildObjCForCollectionStmt(S->getForLoc(),
/*FIXME:*/S->getForLoc(),
Element.get(),
Collection.get(),
S->getRParenLoc(),