aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2010-08-21 06:26:59 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2010-08-21 06:26:59 +0000
commit0b46b1bc647db68ed3511b53e96699cfe14658fd (patch)
treed57c74895b3a8c5523ff5e247adafb743feb8fff
parent13cfedb26c07dbe4ff20214943d231f7c93be81e (diff)
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
-rw-r--r--lib/Checker/RegionStore.cpp11
1 files changed, 2 insertions, 9 deletions
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);