[cfe-commits] r57914 - /cfe/trunk/lib/AST/ASTContext.cpp

Steve Naroff snaroff at apple.com
Tue Oct 21 11:24:05 PDT 2008


Author: snaroff
Date: Tue Oct 21 13:24:04 2008
New Revision: 57914

URL: http://llvm.org/viewvc/llvm-project?rev=57914&view=rev
Log:
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.


Modified:
    cfe/trunk/lib/AST/ASTContext.cpp

Modified: cfe/trunk/lib/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=57914&r1=57913&r2=57914&view=diff

==============================================================================
--- cfe/trunk/lib/AST/ASTContext.cpp (original)
+++ cfe/trunk/lib/AST/ASTContext.cpp Tue Oct 21 13:24:04 2008
@@ -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;
   





More information about the cfe-commits mailing list