diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-08-14 21:53:27 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-08-14 21:53:27 +0000 |
commit | a5e42a82ce055f29f3733f3a1f10da6cb9877dee (patch) | |
tree | b9e1e47c543cb40b4e7591020bda339daf1e072b /lib/Sema/SemaStmt.cpp | |
parent | 5a6bfe35051c1c14b63e1fa103c2cc512dab66b8 (diff) |
objc2's foreach statement's selector type can be
a block pointer too.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79050 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r-- | lib/Sema/SemaStmt.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp index 65611f2e58..f66ee1e30f 100644 --- a/lib/Sema/SemaStmt.cpp +++ b/lib/Sema/SemaStmt.cpp @@ -693,7 +693,8 @@ Sema::ActOnObjCForCollectionStmt(SourceLocation ForLoc, FirstType = static_cast<Expr*>(First)->getType(); } - if (!FirstType->isObjCObjectPointerType()) + if (!FirstType->isObjCObjectPointerType() && + !FirstType->isBlockPointerType()) Diag(ForLoc, diag::err_selector_element_type) << FirstType << First->getSourceRange(); } |