diff options
author | Steve Naroff <snaroff@apple.com> | 2008-10-21 18:24:04 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2008-10-21 18:24:04 +0000 |
commit | 6ae98506f93617b1eda486406b376c9b70cd2df3 (patch) | |
tree | b911f68fa5c04098edfb4ade61dd8137b5db496b | |
parent | 2bd03723e7a8c982ce7b35115f5cc8755aa7091c (diff) |
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
-rw-r--r-- | lib/AST/ASTContext.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index cbbfe317d5..75c5888048 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -1807,6 +1807,11 @@ bool ASTContext::isObjCObjectPointerType(QualType Ty) const { if (Ty->isObjCQualifiedIdType()) return true; + // Blocks are objects. + if (Ty->isBlockPointerType()) + return true; + + // All other object types are pointers. if (!Ty->isPointerType()) return false; |