summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Frontend
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-08-14 23:04:18 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-08-14 23:04:18 +0000
commit2b3d49b610bd2a45884115edcb21110bfa325f51 (patch)
tree4c64632086b8cf0a8d7ee68306f564532a5ea78f /clang/lib/StaticAnalyzer/Frontend
parent5cd312d352dc663aec3b658e2bf5da347f365eb1 (diff)
downloadbcm5719-llvm-2b3d49b610bd2a45884115edcb21110bfa325f51.tar.gz
bcm5719-llvm-2b3d49b610bd2a45884115edcb21110bfa325f51.zip
[Clang] Migrate llvm::make_unique to std::make_unique
Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. Differential revision: https://reviews.llvm.org/D66259 llvm-svn: 368942
Diffstat (limited to 'clang/lib/StaticAnalyzer/Frontend')
-rw-r--r--clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp12
-rw-r--r--clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp2
-rw-r--r--clang/lib/StaticAnalyzer/Frontend/FrontendActions.cpp2
3 files changed, 8 insertions, 8 deletions
diff --git a/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp b/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
index ce3deee7b26..cba5f9fbf05 100644
--- a/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
+++ b/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
@@ -212,13 +212,13 @@ public:
Plugins(plugins), Injector(injector), CTU(CI) {
DigestAnalyzerOptions();
if (Opts->PrintStats || Opts->ShouldSerializeStats) {
- AnalyzerTimers = llvm::make_unique<llvm::TimerGroup>(
+ AnalyzerTimers = std::make_unique<llvm::TimerGroup>(
"analyzer", "Analyzer timers");
- SyntaxCheckTimer = llvm::make_unique<llvm::Timer>(
+ SyntaxCheckTimer = std::make_unique<llvm::Timer>(
"syntaxchecks", "Syntax-based analysis time", *AnalyzerTimers);
- ExprEngineTimer = llvm::make_unique<llvm::Timer>(
+ ExprEngineTimer = std::make_unique<llvm::Timer>(
"exprengine", "Path exploration time", *AnalyzerTimers);
- BugReporterTimer = llvm::make_unique<llvm::Timer>(
+ BugReporterTimer = std::make_unique<llvm::Timer>(
"bugreporter", "Path-sensitive report post-processing time",
*AnalyzerTimers);
llvm::EnableStatistics(/* PrintOnExit= */ false);
@@ -311,7 +311,7 @@ public:
checkerMgr = createCheckerManager(
*Ctx, *Opts, Plugins, CheckerRegistrationFns, PP.getDiagnostics());
- Mgr = llvm::make_unique<AnalysisManager>(
+ Mgr = std::make_unique<AnalysisManager>(
*Ctx, PP.getDiagnostics(), PathConsumers, CreateStoreMgr,
CreateConstraintMgr, checkerMgr.get(), *Opts, Injector);
}
@@ -826,7 +826,7 @@ ento::CreateAnalysisConsumer(CompilerInstance &CI) {
AnalyzerOptionsRef analyzerOpts = CI.getAnalyzerOpts();
bool hasModelPath = analyzerOpts->Config.count("model-path") > 0;
- return llvm::make_unique<AnalysisConsumer>(
+ return std::make_unique<AnalysisConsumer>(
CI, CI.getFrontendOpts().OutputFile, analyzerOpts,
CI.getFrontendOpts().Plugins,
hasModelPath ? new ModelInjector(CI) : nullptr);
diff --git a/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp b/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
index 1e45ee96145..9571679ef12 100644
--- a/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
+++ b/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
@@ -30,7 +30,7 @@ std::unique_ptr<CheckerManager> ento::createCheckerManager(
ArrayRef<std::string> plugins,
ArrayRef<std::function<void(CheckerRegistry &)>> checkerRegistrationFns,
DiagnosticsEngine &diags) {
- auto checkerMgr = llvm::make_unique<CheckerManager>(context, opts);
+ auto checkerMgr = std::make_unique<CheckerManager>(context, opts);
CheckerRegistry allCheckers(plugins, diags, opts, context.getLangOpts(),
checkerRegistrationFns);
diff --git a/clang/lib/StaticAnalyzer/Frontend/FrontendActions.cpp b/clang/lib/StaticAnalyzer/Frontend/FrontendActions.cpp
index a8af6b3d801..04fbd0cea46 100644
--- a/clang/lib/StaticAnalyzer/Frontend/FrontendActions.cpp
+++ b/clang/lib/StaticAnalyzer/Frontend/FrontendActions.cpp
@@ -23,5 +23,5 @@ ParseModelFileAction::ParseModelFileAction(llvm::StringMap<Stmt *> &Bodies)
std::unique_ptr<ASTConsumer>
ParseModelFileAction::CreateASTConsumer(CompilerInstance &CI,
StringRef InFile) {
- return llvm::make_unique<ModelConsumer>(Bodies);
+ return std::make_unique<ModelConsumer>(Bodies);
}
OpenPOWER on IntegriCloud