aboutsummaryrefslogtreecommitdiff
path: root/lib/Checker/MemRegion.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2010-08-11 06:10:55 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2010-08-11 06:10:55 +0000
commit018220c343c103b7dfaa117a7a474c7a7fd6d068 (patch)
tree40dc57713cecb35317bb9b28a17941d07803c716 /lib/Checker/MemRegion.cpp
parent18451ea83a4ec5a61816c20dc03f2ed8648600d1 (diff)
MemRegion can refer to ASTContext without external help.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110784 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/MemRegion.cpp')
-rw-r--r--lib/Checker/MemRegion.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Checker/MemRegion.cpp b/lib/Checker/MemRegion.cpp
index 58006708fa..3f706e145a 100644
--- a/lib/Checker/MemRegion.cpp
+++ b/lib/Checker/MemRegion.cpp
@@ -178,7 +178,7 @@ const StackFrameContext *VarRegion::getStackFrame() const {
DefinedOrUnknownSVal DeclRegion::getExtent(ValueManager& ValMgr) const {
ASTContext& Ctx = ValMgr.getContext();
- QualType T = getDesugaredValueType(Ctx);
+ QualType T = getDesugaredValueType();
if (isa<VariableArrayType>(T))
return nonloc::SymbolVal(ValMgr.getSymbolManager().getExtentSymbol(this));
@@ -196,8 +196,7 @@ DefinedOrUnknownSVal FieldRegion::getExtent(ValueManager& ValMgr) const {
// A zero-length array at the end of a struct often stands for dynamically-
// allocated extra memory.
if (Extent.isZeroConstant()) {
- ASTContext& Ctx = ValMgr.getContext();
- QualType T = getDesugaredValueType(Ctx);
+ QualType T = getDesugaredValueType();
if (isa<ConstantArrayType>(T))
return UnknownVal();
@@ -846,7 +845,7 @@ RegionOffset MemRegion::getAsOffset() const {
goto Finish;
case ElementRegionKind: {
const ElementRegion *ER = cast<ElementRegion>(R);
- QualType EleTy = ER->getValueType(getContext());
+ QualType EleTy = ER->getValueType();
if (!IsCompleteType(getContext(), EleTy))
return RegionOffset(0);