From: Zhongxing Xu Date: Sat, 21 Aug 2010 06:26:59 +0000 (+0000) Subject: When invalidating a struct region, whether its type definition exists is not X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0b46b1bc647db68ed3511b53e96699cfe14658fd;p=clang When invalidating a struct region, whether its type definition exists is not relavant any more, because we set its default value to a symbol, and the type of default symbolic value is irrelavant. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111730 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Checker/RegionStore.cpp b/lib/Checker/RegionStore.cpp index 3fb9957275..c8c392bfaf 100644 --- a/lib/Checker/RegionStore.cpp +++ b/lib/Checker/RegionStore.cpp @@ -667,15 +667,8 @@ void InvalidateRegionsWorker::VisitBaseRegion(const MemRegion *baseR) { // Invalidate the binding. if (const RecordType *RT = T->getAsStructureType()) { - const RecordDecl *RD = RT->getDecl()->getDefinition(); - // No record definition. There is nothing we can do. - if (!RD) { - B = RM.Remove(B, baseR); - return; - } - - // Invalidate the region by setting its default value to - // conjured symbol. The type of the symbol is irrelavant. + // Invalidate the region by setting its default value to + // conjured symbol. The type of the symbol is irrelavant. DefinedOrUnknownSVal V = ValMgr.getConjuredSymbolVal(baseR, Ex, Ctx.IntTy, Count); B = RM.Add(B, baseR, BindingKey::Default, V);