summaryrefslogtreecommitdiffstats
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
commitadc3ac70121f2aa7831b8a1714bdd69f7475955d (patch)
tree6262ab1b890b312ca4c1120f5f8f850298a9a0eb
parent1d9c76d637a2391ca03978c591d85b5ac8579bcc (diff)
downloadbcm5719-llvm-adc3ac70121f2aa7831b8a1714bdd69f7475955d.tar.gz
bcm5719-llvm-adc3ac70121f2aa7831b8a1714bdd69f7475955d.zip
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. llvm-svn: 111730
-rw-r--r--clang/lib/Checker/RegionStore.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/clang/lib/Checker/RegionStore.cpp b/clang/lib/Checker/RegionStore.cpp
index 3fb9957275d..c8c392bfaf2 100644
--- a/clang/lib/Checker/RegionStore.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud