aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2009-01-23 10:19:29 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2009-01-23 10:19:29 +0000
commitc496f14291b6577cf9bb1737efae01cce71182e2 (patch)
tree65034b1d3239aceb3f8489a0c5ae79f988b33d9f
parent09d5b16d0ea4b4fc267791a1d0773db8bf7d8d99 (diff)
When getting the element region type, we should get the rvalue type of the super
region. Otherwise we would get an extra level of pointer type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62844 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Analysis/MemRegion.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/MemRegion.cpp b/lib/Analysis/MemRegion.cpp
index 72b1e0b4f7..2724ed0ada 100644
--- a/lib/Analysis/MemRegion.cpp
+++ b/lib/Analysis/MemRegion.cpp
@@ -108,8 +108,8 @@ void ElementRegion::Profile(llvm::FoldingSetNodeID& ID) const {
}
QualType ElementRegion::getRValueType(ASTContext& C) const {
- QualType T = getArrayRegion()->getLValueType(C);
- // FIXME: Should ArrayType be considered an LValue or RValue type?
+ QualType T = getArrayRegion()->getRValueType(C);
+
if (isa<ArrayType>(T.getTypePtr())) {
ArrayType* AT = cast<ArrayType>(T.getTypePtr());
return AT->getElementType();