]> granicus.if.org Git - clang/commitdiff
Fix <rdar://problem/6257645> clang static analyzer crashes when encountering blocks...
authorSteve Naroff <snaroff@apple.com>
Tue, 21 Oct 2008 18:24:04 +0000 (18:24 +0000)
committerSteve Naroff <snaroff@apple.com>
Tue, 21 Oct 2008 18:24:04 +0000 (18:24 +0000)
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

lib/AST/ASTContext.cpp

index cbbfe317d5e1108cc8d408cba09b86195712ede6..75c58880486916051e21f3276d16a7a41ae4ce5e 100644 (file)
@@ -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;