Allow CodeTextRegion to be cast to 'void *'.

llvm-svn: 73880
This commit is contained in:
Zhongxing Xu 2009-06-22 08:36:10 +00:00
parent 376c6f16de
commit 8077d7eb15
1 changed files with 3 additions and 1 deletions

View 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);
}