summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-09-05 00:14:57 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-09-05 00:14:57 +0000
commita48a53cc8e23b195e49d06f71c5d0762c6b372da (patch)
tree0adff89cbc179ea55a86d88e4eb25fabfbe59c04 /clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
parent7eb3b06ca2e0a896ea4611b64ceb2da5c5915361 (diff)
downloadbcm5719-llvm-a48a53cc8e23b195e49d06f71c5d0762c6b372da.tar.gz
bcm5719-llvm-a48a53cc8e23b195e49d06f71c5d0762c6b372da.zip
unique_ptrify AnalysisConsumer.cpp::CreateUbiViz
llvm-svn: 217212
Diffstat (limited to 'clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp b/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
index 3ebab0930a5..ca047a966b9 100644
--- a/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
+++ b/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
@@ -54,7 +54,7 @@ using llvm::SmallPtrSet;
#define DEBUG_TYPE "AnalysisConsumer"
-static ExplodedNode::Auditor* CreateUbiViz();
+static std::unique_ptr<ExplodedNode::Auditor> CreateUbiViz();
STATISTIC(NumFunctionTopLevel, "The # of functions at top level.");
STATISTIC(NumFunctionsAnalyzed,
@@ -649,7 +649,7 @@ void AnalysisConsumer::ActionExprEngine(Decl *D, bool ObjCGCEnabled,
// Set the graph auditor.
std::unique_ptr<ExplodedNode::Auditor> Auditor;
if (Mgr->options.visualizeExplodedGraphWithUbiGraph) {
- Auditor.reset(CreateUbiViz());
+ Auditor = CreateUbiViz();
ExplodedNode::SetAuditor(Auditor.get());
}
@@ -731,7 +731,7 @@ public:
} // end anonymous namespace
-static ExplodedNode::Auditor* CreateUbiViz() {
+static std::unique_ptr<ExplodedNode::Auditor> CreateUbiViz() {
SmallString<128> P;
int FD;
llvm::sys::fs::createTemporaryFile("llvm_ubi", "", FD, P);
@@ -739,7 +739,7 @@ static ExplodedNode::Auditor* CreateUbiViz() {
auto Stream = llvm::make_unique<llvm::raw_fd_ostream>(FD, true);
- return new UbigraphViz(std::move(Stream), P);
+ return llvm::make_unique<UbigraphViz>(std::move(Stream), P);
}
void UbigraphViz::AddEdge(ExplodedNode *Src, ExplodedNode *Dst) {
OpenPOWER on IntegriCloud