diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-08-11 06:10:55 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-08-11 06:10:55 +0000 |
commit | 018220c343c103b7dfaa117a7a474c7a7fd6d068 (patch) | |
tree | 40dc57713cecb35317bb9b28a17941d07803c716 /lib/Checker/CStringChecker.cpp | |
parent | 18451ea83a4ec5a61816c20dc03f2ed8648600d1 (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/CStringChecker.cpp')
-rw-r--r-- | lib/Checker/CStringChecker.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/Checker/CStringChecker.cpp b/lib/Checker/CStringChecker.cpp index bb40b04bb1..d2e921bc5c 100644 --- a/lib/Checker/CStringChecker.cpp +++ b/lib/Checker/CStringChecker.cpp @@ -145,7 +145,7 @@ const GRState *CStringChecker::CheckLocation(CheckerContext &C, if (!ER) return state; - assert(ER->getValueType(C.getASTContext()) == C.getASTContext().CharTy && + assert(ER->getValueType() == C.getASTContext().CharTy && "CheckLocation should only be called with char* ElementRegions"); // Get the size of the array. @@ -518,20 +518,16 @@ bool CStringChecker::SummarizeRegion(llvm::raw_ostream& os, ASTContext& Ctx, return true; case MemRegion::CXXThisRegionKind: case MemRegion::CXXObjectRegionKind: - os << "a C++ object of type " - << TR->getValueType(Ctx).getAsString(); + os << "a C++ object of type " << TR->getValueType().getAsString(); return true; case MemRegion::VarRegionKind: - os << "a variable of type" - << TR->getValueType(Ctx).getAsString(); + os << "a variable of type" << TR->getValueType().getAsString(); return true; case MemRegion::FieldRegionKind: - os << "a field of type " - << TR->getValueType(Ctx).getAsString(); + os << "a field of type " << TR->getValueType().getAsString(); return true; case MemRegion::ObjCIvarRegionKind: - os << "an instance variable of type " - << TR->getValueType(Ctx).getAsString(); + os << "an instance variable of type " << TR->getValueType().getAsString(); return true; default: return false; |