summaryrefslogtreecommitdiffstats
path: root/clang/Sema/SemaStmt.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2008-01-10 00:24:29 +0000
committerFariborz Jahanian <fjahanian@apple.com>2008-01-10 00:24:29 +0000
commit82ae0152a7ab97745af28d777cc612f0e702b06a (patch)
tree651d00ec0bbe880d19699999e2e71d38ce6b4654 /clang/Sema/SemaStmt.cpp
parent73d1017871ec6b8024964e7379e1ef22ea111b72 (diff)
downloadbcm5719-llvm-82ae0152a7ab97745af28d777cc612f0e702b06a.tar.gz
bcm5719-llvm-82ae0152a7ab97745af28d777cc612f0e702b06a.zip
Allow messaging expression as foreach's collection expression.
llvm-svn: 45793
Diffstat (limited to 'clang/Sema/SemaStmt.cpp')
-rw-r--r--clang/Sema/SemaStmt.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/Sema/SemaStmt.cpp b/clang/Sema/SemaStmt.cpp
index 7f540d4611a..fbe9294b203 100644
--- a/clang/Sema/SemaStmt.cpp
+++ b/clang/Sema/SemaStmt.cpp
@@ -531,7 +531,7 @@ Sema::ActOnForStmt(SourceLocation ForLoc, SourceLocation LParenLoc,
}
Action::StmtResult
-Sema::ActOnObjCForCollectionStmt(SourceLocation ForColLoc,
+Sema::ActOnObjCForCollectionStmt(SourceLocation ForLoc,
SourceLocation LParenLoc,
StmtTy *first, ExprTy *second,
SourceLocation RParenLoc, StmtTy *body) {
@@ -553,16 +553,16 @@ Sema::ActOnObjCForCollectionStmt(SourceLocation ForColLoc,
else
FirstType = static_cast<Expr*>(first)->getType();
if (!isObjCObjectPointerType(FirstType))
- Diag(ForColLoc, diag::err_selector_element_type,
+ Diag(ForLoc, diag::err_selector_element_type,
FirstType.getAsString(), First->getSourceRange());
if (Second) {
DefaultFunctionArrayConversion(Second);
QualType SecondType = Second->getType();
if (!isObjCObjectPointerType(SecondType))
- Diag(ForColLoc, diag::err_collection_expr_type,
+ Diag(ForLoc, diag::err_collection_expr_type,
SecondType.getAsString(), Second->getSourceRange());
}
- return new ObjCForCollectionStmt(First, Second, Body, ForColLoc);
+ return new ObjCForCollectionStmt(First, Second, Body, ForLoc, RParenLoc);
}
Action::StmtResult
OpenPOWER on IntegriCloud