Incomplete struct pointer can be used as a function argument.

llvm-svn: 59235
This commit is contained in:
Zhongxing Xu 2008-11-13 08:41:36 +00:00
parent 320902bcfc
commit 29188c2948
1 changed files with 7 additions and 1 deletions

View File

@ -301,7 +301,13 @@ Store RegionStoreManager::BindStruct(Store store, const TypedRegion* R, SVal V){
const RecordType* RT = cast<RecordType>(T.getTypePtr());
RecordDecl* RD = RT->getDecl();
assert(RD->isDefinition());
if (!RD->isDefinition()) {
// This can only occur when a pointer of imcomplete struct type is used as a
// function argument.
assert(V.isUnknown());
return store;
}
RegionBindingsTy B = GetRegionBindings(store);