]> granicus.if.org Git - clang/commitdiff
When invalidating a struct region, whether its type definition exists is not
authorZhongxing Xu <xuzhongxing@gmail.com>
Sat, 21 Aug 2010 06:26:59 +0000 (06:26 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Sat, 21 Aug 2010 06:26:59 +0000 (06:26 +0000)
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

lib/Checker/RegionStore.cpp

index 3fb9957275d653733a3109a1bae78ef9534aba5c..c8c392bfaf21bbe5a69bdbcb5acea75f8b28ce65 100644 (file)
@@ -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);