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
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp
index 65611f2..f66ee1e 100644
--- a/lib/Sema/SemaStmt.cpp
+++ b/lib/Sema/SemaStmt.cpp
@@ -693,7 +693,8 @@
FirstType = static_cast<Expr*>(First)->getType();
}
- if (!FirstType->isObjCObjectPointerType())
+ if (!FirstType->isObjCObjectPointerType() &&
+ !FirstType->isBlockPointerType())
Diag(ForLoc, diag::err_selector_element_type)
<< FirstType << First->getSourceRange();
}