summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2011-10-25 19:57:11 +0000
committerAnna Zaks <ganna@apple.com>2011-10-25 19:57:11 +0000
commit58734db080235823ba664f3a9c168ba3127fa51a (patch)
tree6896aab79588c9a3d72eeb5cf085d48765808497 /clang/lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp
parentb473816b4a067514385281be17ba7a1e1c84a483 (diff)
downloadbcm5719-llvm-58734db080235823ba664f3a9c168ba3127fa51a.tar.gz
bcm5719-llvm-58734db080235823ba664f3a9c168ba3127fa51a.zip
[analyzer] Remove getEngine() form CheckerContext
A step toward making sure that diagnostics report should only be generated though the CheckerContext and not though BugReporter or ExprEngine directly. llvm-svn: 142947
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp
index 7f74a7d015d..4eabd7aaf3f 100644
--- a/clang/lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp
@@ -67,12 +67,11 @@ void NSAutoreleasePoolChecker::checkPreObjCMessage(ObjCMessage msg,
return;
SourceRange R = msg.getSourceRange();
- BugReporter &BR = C.getBugReporter();
const LocationContext *LC = C.getPredecessor()->getLocationContext();
- const SourceManager &SM = BR.getSourceManager();
+ const SourceManager &SM = C.getSourceManager();
const Expr *E = msg.getMsgOrPropExpr();
PathDiagnosticLocation L = PathDiagnosticLocation::createBegin(E, SM, LC);
- C.getBugReporter().EmitBasicReport("Use -drain instead of -release",
+ C.EmitBasicReport("Use -drain instead of -release",
"API Upgrade (Apple)",
"Use -drain instead of -release when using NSAutoreleasePool "
"and garbage collection", L, &R, 1);
OpenPOWER on IntegriCloud