aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/CrossTU
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2019-08-30 09:29:34 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2019-08-30 09:29:34 +0000
commitb22804b35464049ca92107d45042d2a5bbd292f6 (patch)
tree4e29b283156209efc4945de2129c9f8ad878d28f /clang/unittests/CrossTU
parent12a7e6c09cda7fd0259be85c949cf87b040bf1b7 (diff)
downloadllvm-b22804b35464049ca92107d45042d2a5bbd292f6.zip
llvm-b22804b35464049ca92107d45042d2a5bbd292f6.tar.gz
llvm-b22804b35464049ca92107d45042d2a5bbd292f6.tar.bz2
[Tooling] Migrated APIs that take ownership of objects to unique_ptr
Subscribers: jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66960 llvm-svn: 370451
Diffstat (limited to 'clang/unittests/CrossTU')
-rw-r--r--clang/unittests/CrossTU/CrossTranslationUnitTest.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/unittests/CrossTU/CrossTranslationUnitTest.cpp b/clang/unittests/CrossTU/CrossTranslationUnitTest.cpp
index 3cea339..86ede5e 100644
--- a/clang/unittests/CrossTU/CrossTranslationUnitTest.cpp
+++ b/clang/unittests/CrossTU/CrossTranslationUnitTest.cpp
@@ -134,15 +134,15 @@ private:
TEST(CrossTranslationUnit, CanLoadFunctionDefinition) {
bool Success = false;
- EXPECT_TRUE(
- tooling::runToolOnCode(new CTUAction(&Success, 1u), "int f(int);"));
+ EXPECT_TRUE(tooling::runToolOnCode(std::make_unique<CTUAction>(&Success, 1u),
+ "int f(int);"));
EXPECT_TRUE(Success);
}
TEST(CrossTranslationUnit, RespectsLoadThreshold) {
bool Success = false;
- EXPECT_TRUE(
- tooling::runToolOnCode(new CTUAction(&Success, 0u), "int f(int);"));
+ EXPECT_TRUE(tooling::runToolOnCode(std::make_unique<CTUAction>(&Success, 0u),
+ "int f(int);"));
EXPECT_FALSE(Success);
}