diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-11-13 08:41:36 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-11-13 08:41:36 +0000 |
commit | a4f28ffac7ddfe97a38f089678acec39865d0117 (patch) | |
tree | 037d848ac9f77d76916eddf9df7f018d5b787481 /lib/Analysis/RegionStore.cpp | |
parent | b670133b9e9fd7bce078674d782dad9d7c320f9d (diff) |
Incomplete struct pointer can be used as a function argument.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59235 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/RegionStore.cpp')
-rw-r--r-- | lib/Analysis/RegionStore.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Analysis/RegionStore.cpp b/lib/Analysis/RegionStore.cpp index ba73761ad9..562d584558 100644 --- a/lib/Analysis/RegionStore.cpp +++ b/lib/Analysis/RegionStore.cpp @@ -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); |