]> granicus.if.org Git - clang/commitdiff
Allow CodeTextRegion to be cast to 'void *'.
authorZhongxing Xu <xuzhongxing@gmail.com>
Mon, 22 Jun 2009 08:36:10 +0000 (08:36 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Mon, 22 Jun 2009 08:36:10 +0000 (08:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73880 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/RegionStore.cpp

index 5f2b8f809de31db4dac2eadc4a94306066c52c03..427c231800138a6b7af5e100d7a4a803c3f88b00 100644 (file)
@@ -676,7 +676,9 @@ RegionStoreManager::CastRegion(const GRState *state, const MemRegion* R,
 
   // CodeTextRegion should be cast to only function pointer type.
   if (isa<CodeTextRegion>(R)) {
-    assert(CastToTy->isFunctionPointerType() || CastToTy->isBlockPointerType());
+    assert(CastToTy->isFunctionPointerType() || CastToTy->isBlockPointerType()
+           || (CastToTy->isPointerType() 
+              && CastToTy->getAsPointerType()->getPointeeType()->isVoidType()));
     return CastResult(state, R);
   }