aboutsummaryrefslogtreecommitdiff
path: root/lib/Checker/BugReporterVisitors.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/BugReporterVisitors.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/BugReporterVisitors.cpp')
-rw-r--r--lib/Checker/BugReporterVisitors.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Checker/BugReporterVisitors.cpp b/lib/Checker/BugReporterVisitors.cpp
index 0323fe6d8f..a6ad245bba 100644
--- a/lib/Checker/BugReporterVisitors.cpp
+++ b/lib/Checker/BugReporterVisitors.cpp
@@ -143,10 +143,9 @@ public:
if (isa<loc::ConcreteInt>(V)) {
bool b = false;
- ASTContext &C = BRC.getASTContext();
if (R->isBoundable()) {
if (const TypedRegion *TR = dyn_cast<TypedRegion>(R)) {
- if (TR->getValueType(C)->isObjCObjectPointerType()) {
+ if (TR->getValueType()->isObjCObjectPointerType()) {
os << "initialized to nil";
b = true;
}
@@ -174,10 +173,9 @@ public:
if (os.str().empty()) {
if (isa<loc::ConcreteInt>(V)) {
bool b = false;
- ASTContext &C = BRC.getASTContext();
if (R->isBoundable()) {
if (const TypedRegion *TR = dyn_cast<TypedRegion>(R)) {
- if (TR->getValueType(C)->isObjCObjectPointerType()) {
+ if (TR->getValueType()->isObjCObjectPointerType()) {
os << "nil object reference stored to ";
b = true;
}