From: Steve Naroff Date: Tue, 21 Oct 2008 18:24:04 +0000 (+0000) Subject: Fix clang static analyzer crashes when encountering blocks... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6ae98506f93617b1eda486406b376c9b70cd2df3;p=clang Fix 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 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;