summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Tooling/ToolingTest.cpp
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/ToolingTest.cpp
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/ToolingTest.cpp')
-rw-r--r--clang/unittests/Tooling/ToolingTest.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/clang/unittests/Tooling/ToolingTest.cpp b/clang/unittests/Tooling/ToolingTest.cpp
index f9f4de3d9a1..447b9973e4a 100644
--- a/clang/unittests/Tooling/ToolingTest.cpp
+++ b/clang/unittests/Tooling/ToolingTest.cpp
@@ -63,7 +63,7 @@ class FindTopLevelDeclConsumer : public clang::ASTConsumer {
TEST(runToolOnCode, FindsNoTopLevelDeclOnEmptyCode) {
bool FoundTopLevelDecl = false;
EXPECT_TRUE(
- runToolOnCode(new TestAction(llvm::make_unique<FindTopLevelDeclConsumer>(
+ runToolOnCode(new TestAction(std::make_unique<FindTopLevelDeclConsumer>(
&FoundTopLevelDecl)),
""));
EXPECT_FALSE(FoundTopLevelDecl);
@@ -103,14 +103,14 @@ bool FindClassDeclX(ASTUnit *AST) {
TEST(runToolOnCode, FindsClassDecl) {
bool FoundClassDeclX = false;
EXPECT_TRUE(
- runToolOnCode(new TestAction(llvm::make_unique<FindClassDeclXConsumer>(
+ runToolOnCode(new TestAction(std::make_unique<FindClassDeclXConsumer>(
&FoundClassDeclX)),
"class X;"));
EXPECT_TRUE(FoundClassDeclX);
FoundClassDeclX = false;
EXPECT_TRUE(
- runToolOnCode(new TestAction(llvm::make_unique<FindClassDeclXConsumer>(
+ runToolOnCode(new TestAction(std::make_unique<FindClassDeclXConsumer>(
&FoundClassDeclX)),
"class Y;"));
EXPECT_FALSE(FoundClassDeclX);
@@ -135,7 +135,7 @@ TEST(newFrontendActionFactory, CreatesFrontendActionFactoryFromType) {
struct IndependentFrontendActionCreator {
std::unique_ptr<ASTConsumer> newASTConsumer() {
- return llvm::make_unique<FindTopLevelDeclConsumer>(nullptr);
+ return std::make_unique<FindTopLevelDeclConsumer>(nullptr);
}
};
@@ -207,7 +207,7 @@ struct VerifyEndCallback : public SourceFileCallbacks {
}
void handleEndSource() override { ++EndCalled; }
std::unique_ptr<ASTConsumer> newASTConsumer() {
- return llvm::make_unique<FindTopLevelDeclConsumer>(&Matched);
+ return std::make_unique<FindTopLevelDeclConsumer>(&Matched);
}
unsigned BeginCalled;
unsigned EndCalled;
@@ -249,7 +249,7 @@ struct SkipBodyAction : public clang::ASTFrontendAction {
std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &Compiler,
StringRef) override {
Compiler.getFrontendOpts().SkipFunctionBodies = true;
- return llvm::make_unique<SkipBodyConsumer>();
+ return std::make_unique<SkipBodyConsumer>();
}
};
@@ -340,7 +340,7 @@ struct CheckColoredDiagnosticsAction : public clang::ASTFrontendAction {
Compiler.getDiagnostics().getCustomDiagID(
DiagnosticsEngine::Fatal,
"getDiagnosticOpts().ShowColors != ShouldShowColor"));
- return llvm::make_unique<ASTConsumer>();
+ return std::make_unique<ASTConsumer>();
}
private:
@@ -651,7 +651,7 @@ TEST(runToolOnCode, TestResetDiagnostics) {
return true;
}
};
- return llvm::make_unique<Consumer>();
+ return std::make_unique<Consumer>();
}
};
OpenPOWER on IntegriCloud