diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-09-05 00:11:25 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-09-05 00:11:25 +0000 |
commit | ad464dbf0b199c2cea242e6ba36314a1ea414902 (patch) | |
tree | 9b322c07597b58468a08718b8c23a253f2fb6902 /clang/lib/StaticAnalyzer/Core/BugReporter.cpp | |
parent | bc48abf43d19b6f8293b2042f4394cc958a5d90a (diff) | |
download | bcm5719-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.cpp | 5 |
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; } |