Skip to content
Snippets Groups Projects
Commit 5cfa5af6 authored by Steve Naroff's avatar Steve Naroff
Browse files

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.
llvm-svn: 57914
parent e94444fa
No related branches found
No related tags found
No related merge requests found
...@@ -1807,6 +1807,11 @@ bool ASTContext::isObjCObjectPointerType(QualType Ty) const { ...@@ -1807,6 +1807,11 @@ bool ASTContext::isObjCObjectPointerType(QualType Ty) const {
if (Ty->isObjCQualifiedIdType()) if (Ty->isObjCQualifiedIdType())
return true; return true;
// Blocks are objects.
if (Ty->isBlockPointerType())
return true;
// All other object types are pointers.
if (!Ty->isPointerType()) if (!Ty->isPointerType())
return false; return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment