]> granicus.if.org Git - clang/commitdiff
When getting the element region type, we should get the rvalue type of the super
authorZhongxing Xu <xuzhongxing@gmail.com>
Fri, 23 Jan 2009 10:19:29 +0000 (10:19 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Fri, 23 Jan 2009 10:19:29 +0000 (10:19 +0000)
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

lib/Analysis/MemRegion.cpp

index 72b1e0b4f7f29caa1a4c61362f8d71ee79e450b6..2724ed0ada2283fe74d67ac40059c0dc6b6a7247 100644 (file)
@@ -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();