summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Tooling/Syntax
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/unittests/Tooling/Syntax
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/unittests/Tooling/Syntax')
-rw-r--r--clang/unittests/Tooling/Syntax/TokensTest.cpp2
-rw-r--r--clang/unittests/Tooling/Syntax/TreeTest.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/clang/unittests/Tooling/Syntax/TokensTest.cpp b/clang/unittests/Tooling/Syntax/TokensTest.cpp
index a1398bd5568..78f0d2fdd87 100644
--- a/clang/unittests/Tooling/Syntax/TokensTest.cpp
+++ b/clang/unittests/Tooling/Syntax/TokensTest.cpp
@@ -106,7 +106,7 @@ public:
std::unique_ptr<ASTConsumer>
CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override {
- return llvm::make_unique<ASTConsumer>();
+ return std::make_unique<ASTConsumer>();
}
private:
diff --git a/clang/unittests/Tooling/Syntax/TreeTest.cpp b/clang/unittests/Tooling/Syntax/TreeTest.cpp
index e83d2b72728..c88a112be52 100644
--- a/clang/unittests/Tooling/Syntax/TreeTest.cpp
+++ b/clang/unittests/Tooling/Syntax/TreeTest.cpp
@@ -40,7 +40,7 @@ protected:
}
void HandleTranslationUnit(ASTContext &Ctx) override {
- Arena = llvm::make_unique<syntax::Arena>(Ctx.getSourceManager(),
+ Arena = std::make_unique<syntax::Arena>(Ctx.getSourceManager(),
Ctx.getLangOpts(),
std::move(*Tokens).consume());
Tokens = nullptr; // make sure we fail if this gets called twice.
@@ -63,8 +63,8 @@ protected:
CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override {
// We start recording the tokens, ast consumer will take on the result.
auto Tokens =
- llvm::make_unique<syntax::TokenCollector>(CI.getPreprocessor());
- return llvm::make_unique<BuildSyntaxTree>(Root, Arena,
+ std::make_unique<syntax::TokenCollector>(CI.getPreprocessor());
+ return std::make_unique<BuildSyntaxTree>(Root, Arena,
std::move(Tokens));
}
OpenPOWER on IntegriCloud