summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2011-09-15 18:56:07 +0000
committerAnna Zaks <ganna@apple.com>2011-09-15 18:56:07 +0000
commit921f04924f8d60c6405bf301c99aaea37450b524 (patch)
tree9d24142856fd1022ada076fbc4a16f84163a1cda /clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
parent6137d32c1b3e3cef750b32ac780d6a669a7b27cb (diff)
downloadbcm5719-llvm-921f04924f8d60c6405bf301c99aaea37450b524.tar.gz
bcm5719-llvm-921f04924f8d60c6405bf301c99aaea37450b524.zip
[analyzer] Refactor: make PathDiagnosticLocation responsible for validation of SourceLocations (commit 2 of ?):
- Fix a fixme and move the logic of creating a PathDiagnosticLocation corresponding to a ProgramPoint into a PathDiagnosticLocation constructor. - Rename PathDiagnosticLocation::create to differentiate from the added constructor. llvm-svn: 139825
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
index 5dd53024b99..ed2a8590ac5 100644
--- a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
@@ -2144,13 +2144,13 @@ CFRefLeakReportVisitor::getEndPath(BugReporterContext &BRC,
llvm::tie(AllocNode, FirstBinding) =
GetAllocationSite(BRC.getStateManager(), EndN, Sym);
- SourceManager& SMgr = BRC.getSourceManager();
+ SourceManager& SM = BRC.getSourceManager();
// Compute an actual location for the leak. Sometimes a leak doesn't
// occur at an actual statement (e.g., transition between blocks; end
// of function) so we need to walk the graph and compute a real location.
const ExplodedNode *LeakN = EndN;
- PathDiagnosticLocation L = PathDiagnosticLocation::create(LeakN, SMgr);
+ PathDiagnosticLocation L = PathDiagnosticLocation::createEndOfPath(LeakN, SM);
std::string sbuf;
llvm::raw_string_ostream os(sbuf);
OpenPOWER on IntegriCloud