From: Zhongxing Xu Date: Mon, 22 Jun 2009 08:36:10 +0000 (+0000) Subject: Allow CodeTextRegion to be cast to 'void *'. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=99823a7946ed7febd56beee8343aa2949144ce71;p=clang Allow CodeTextRegion to be cast to 'void *'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73880 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/RegionStore.cpp b/lib/Analysis/RegionStore.cpp index 5f2b8f809d..427c231800 100644 --- a/lib/Analysis/RegionStore.cpp +++ b/lib/Analysis/RegionStore.cpp @@ -676,7 +676,9 @@ RegionStoreManager::CastRegion(const GRState *state, const MemRegion* R, // CodeTextRegion should be cast to only function pointer type. if (isa(R)) { - assert(CastToTy->isFunctionPointerType() || CastToTy->isBlockPointerType()); + assert(CastToTy->isFunctionPointerType() || CastToTy->isBlockPointerType() + || (CastToTy->isPointerType() + && CastToTy->getAsPointerType()->getPointeeType()->isVoidType())); return CastResult(state, R); }