CXXBaseObjectRegion is like FieldRegion. Need to blast through it when

getting the base region. This makes the RemoveDeadBindings() correct.

llvm-svn: 123375
This commit is contained in:
Zhongxing Xu 2011-01-13 12:46:31 +00:00
parent 0d87e0c65b
commit 3a3c0fd2d1
2 changed files with 2 additions and 1 deletions

View File

@ -770,6 +770,7 @@ const MemRegion *MemRegion::getBaseRegion() const {
case MemRegion::ElementRegionKind:
case MemRegion::FieldRegionKind:
case MemRegion::ObjCIvarRegionKind:
case MemRegion::CXXBaseObjectRegionKind:
R = cast<SubRegion>(R)->getSuperRegion();
continue;
default:

View File

@ -1,4 +1,4 @@
// RUN: %clang_cc1 -analyze -analyzer-check-objc-mem -analyzer-store region -analyzer-inline-call -cfg-add-initializers -verify -analyzer-no-purge-dead %s
// RUN: %clang_cc1 -analyze -analyzer-check-objc-mem -analyzer-store region -analyzer-inline-call -cfg-add-initializers -verify %s
class A {
int x;