summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-09-05 00:11:25 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-09-05 00:11:25 +0000
commitad464dbf0b199c2cea242e6ba36314a1ea414902 (patch)
tree9b322c07597b58468a08718b8c23a253f2fb6902 /clang/lib/StaticAnalyzer/Core/BugReporter.cpp
parentbc48abf43d19b6f8293b2042f4394cc958a5d90a (diff)
downloadbcm5719-llvm-ad464dbf0b199c2cea242e6ba36314a1ea414902.tar.gz
bcm5719-llvm-ad464dbf0b199c2cea242e6ba36314a1ea414902.zip
Remove a use of raw pointer ownership (then non-ownership) in TrimmedGraph::popNextReportGraph
(just cleaning up unique_ptr stuff by finding interesting 'reset' calls at the moment) llvm-svn: 217210
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/BugReporter.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/BugReporter.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
index 342c4e66d7d..0b9c95c1dfe 100644
--- a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
+++ b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
@@ -2920,8 +2920,7 @@ bool TrimmedGraph::popNextReportGraph(ReportGraph &GraphWrapper) {
// Create a new graph with a single path. This is the graph
// that will be returned to the caller.
- ExplodedGraph *GNew = new ExplodedGraph();
- GraphWrapper.Graph.reset(GNew);
+ auto GNew = llvm::make_unique<ExplodedGraph>();
GraphWrapper.BackMap.clear();
// Now walk from the error node up the BFS path, always taking the
@@ -2958,6 +2957,8 @@ bool TrimmedGraph::popNextReportGraph(ReportGraph &GraphWrapper) {
PriorityCompare<false>(PriorityMap));
}
+ GraphWrapper.Graph = std::move(GNew);
+
return true;
}
OpenPOWER on IntegriCloud