Fix <rdar://problem/6257645> clang static analyzer crashes when encountering blocks as objects
ASTContext::isObjCObjectPointerType() needs to consider blocks as objects.
Note: My previous commit was done in the test directory...as a result, this commit was necessary.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57914 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index cbbfe31..75c5888 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -1807,6 +1807,11 @@
if (Ty->isObjCQualifiedIdType())
return true;
+ // Blocks are objects.
+ if (Ty->isBlockPointerType())
+ return true;
+
+ // All other object types are pointers.
if (!Ty->isPointerType())
return false;