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 | 8de0a3d8c3cf4f6491412f44e3ed3061b3208dcb (patch) | |
tree | fa473cb0156532b0afe9971bc8aeaf10f55d8e35 /clang/lib/Checker/BugReporterVisitors.cpp | |
parent | 5cd4d0f9ac43a82d7958c54fc6aaafeec4ddb9e3 (diff) | |
download | bcm5719-llvm-8de0a3d8c3cf4f6491412f44e3ed3061b3208dcb.tar.gz bcm5719-llvm-8de0a3d8c3cf4f6491412f44e3ed3061b3208dcb.zip |
MemRegion can refer to ASTContext without external help.
llvm-svn: 110784
Diffstat (limited to 'clang/lib/Checker/BugReporterVisitors.cpp')
-rw-r--r-- | clang/lib/Checker/BugReporterVisitors.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Checker/BugReporterVisitors.cpp b/clang/lib/Checker/BugReporterVisitors.cpp index 0323fe6d8fe..a6ad245bbaa 100644 --- a/clang/lib/Checker/BugReporterVisitors.cpp +++ b/clang/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; } |