Add TypedViewRegion::isBoundable() to indicate whether or not the
TypedViewRegion has a valid rvalue type. Also renamed instance variable 'T' to
'LvalueType' to make it unambiguous of its purpose.
This fixes some crashes I was seeing after:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090309/013771.html
This is because 'isBoundable()' is defined in TypedRegion (the parent class) in
terms of the rvalue type (which could be null), while for TypedViewRegion it
should be defined in terms of the lvalue type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66712 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/MemRegion.cpp b/lib/Analysis/MemRegion.cpp
index c304b65..5bfc989 100644
--- a/lib/Analysis/MemRegion.cpp
+++ b/lib/Analysis/MemRegion.cpp
@@ -172,7 +172,7 @@
}
void TypedViewRegion::print(llvm::raw_ostream& os) const {
- os << "typed_view{" << T.getAsString() << ',';
+ os << "typed_view{" << LValueType.getAsString() << ',';
getSuperRegion()->print(os);
os << '}';
}