Added investigate patch for an occasionally failing assertion (heisenbug?)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49193 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/BasicObjCFoundationChecks.cpp b/lib/Analysis/BasicObjCFoundationChecks.cpp
index 9169492..6149abe 100644
--- a/lib/Analysis/BasicObjCFoundationChecks.cpp
+++ b/lib/Analysis/BasicObjCFoundationChecks.cpp
@@ -36,9 +36,12 @@
if (!Receiver)
return NULL;
- assert (Receiver->getType()->isPointerType());
+ // FIXME: Cleanup
+ QualType X = Receiver->getType();
+ Type* TP = X.getTypePtr();
+ assert (TP->isPointerType());
- const PointerType* T = Receiver->getType()->getAsPointerType();
+ const PointerType* T = TP->getAsPointerType();
return dyn_cast<ObjCInterfaceType>(T->getPointeeType().getTypePtr());
}