summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-07-17 20:40:36 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-07-17 20:40:36 +0000
commita51666a4d624a745df90e1c84777fb7a644ff80b (patch)
tree27a6715358a552387f3e0fd041de88a3095d0a35 /clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
parentfa59e620126114e35477299dbb726c4e85195276 (diff)
downloadbcm5719-llvm-a51666a4d624a745df90e1c84777fb7a644ff80b.tar.gz
bcm5719-llvm-a51666a4d624a745df90e1c84777fb7a644ff80b.zip
unique_ptr-ify ownership of ASTConsumers
(after fixing a bug in MultiplexConsumer I noticed the ownership of the nested consumers was implemented with raw pointers - so this fixes that... and follows the source back to its origin pushing unique_ptr ownership up through there too) llvm-svn: 213307
Diffstat (limited to 'clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp b/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
index 12e514b322b..23199ee3358 100644
--- a/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
+++ b/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
@@ -687,14 +687,14 @@ void AnalysisConsumer::RunPathSensitiveChecks(Decl *D,
// AnalysisConsumer creation.
//===----------------------------------------------------------------------===//
-AnalysisASTConsumer *
+std::unique_ptr<AnalysisASTConsumer>
ento::CreateAnalysisConsumer(const Preprocessor &pp, const std::string &outDir,
AnalyzerOptionsRef opts,
ArrayRef<std::string> plugins) {
// Disable the effects of '-Werror' when using the AnalysisConsumer.
pp.getDiagnostics().setWarningsAsErrors(false);
- return new AnalysisConsumer(pp, outDir, opts, plugins);
+ return llvm::make_unique<AnalysisConsumer>(pp, outDir, opts, plugins);
}
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud