summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/RegionStore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Analysis/RegionStore.cpp')
-rw-r--r--clang/lib/Analysis/RegionStore.cpp8
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);
OpenPOWER on IntegriCloud