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 | 29188c2948715824b62d06a18642ee6e8975aee1 (patch) | |
| tree | f76c6401d8d1c22e0c9d7dc06d9d19fc93744f84 /clang/lib | |
| parent | 320902bcfcd933e485ddc78e3392a24fd8678951 (diff) | |
| download | bcm5719-llvm-29188c2948715824b62d06a18642ee6e8975aee1.tar.gz bcm5719-llvm-29188c2948715824b62d06a18642ee6e8975aee1.zip | |
Incomplete struct pointer can be used as a function argument.
llvm-svn: 59235
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Analysis/RegionStore.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/Analysis/RegionStore.cpp b/clang/lib/Analysis/RegionStore.cpp index ba73761ad9f..562d5845588 100644 --- a/clang/lib/Analysis/RegionStore.cpp +++ b/clang/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); |

