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