From: Zhongxing Xu Date: Wed, 11 Mar 2009 09:07:35 +0000 (+0000) Subject: Do not stipulate the record type is a definition in BindStruct(). X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c45a8253cadb640dee1d8f23fba4a6c6f8da27f4;p=clang Do not stipulate the record type is a definition in BindStruct(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66654 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/RegionStore.cpp b/lib/Analysis/RegionStore.cpp index 883821128a..84523dc5cf 100644 --- a/lib/Analysis/RegionStore.cpp +++ b/lib/Analysis/RegionStore.cpp @@ -1129,7 +1129,9 @@ RegionStoreManager::BindStruct(const GRState* St, const TypedRegion* R, SVal V){ RecordType* RT = cast(T.getTypePtr()); RecordDecl* RD = RT->getDecl(); - assert(RD->isDefinition()); + + if (!RD->isDefinition()) + return St; if (V.isUnknown()) return KillStruct(St, R);