diff options
author | Sam McCall <sam.mccall@gmail.com> | 2018-09-03 15:23:01 +0000 |
---|---|---|
committer | Sam McCall <sam.mccall@gmail.com> | 2018-09-03 15:23:01 +0000 |
commit | b466e11c390ddcd13daba95991c74efb92cfd3b5 (patch) | |
tree | 43289d279413e4dfe3d52f46dcc86186ef296434 /clang-tools-extra/unittests | |
parent | 26e97995c42ec46688fd3cbb323217f47cd6e111 (diff) | |
download | bcm5719-llvm-b466e11c390ddcd13daba95991c74efb92cfd3b5.tar.gz bcm5719-llvm-b466e11c390ddcd13daba95991c74efb92cfd3b5.zip |
[clangd] Fix ambiguous make_unique with c++17. NFC
llvm-svn: 341321
Diffstat (limited to 'clang-tools-extra/unittests')
-rw-r--r-- | clang-tools-extra/unittests/clangd/IndexTests.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang-tools-extra/unittests/clangd/IndexTests.cpp b/clang-tools-extra/unittests/clangd/IndexTests.cpp index e4c1100c337..181475f2d94 100644 --- a/clang-tools-extra/unittests/clangd/IndexTests.cpp +++ b/clang-tools-extra/unittests/clangd/IndexTests.cpp @@ -56,11 +56,11 @@ TEST(SwapIndexTest, OldIndexRecycled) { auto Token = std::make_shared<int>(); std::weak_ptr<int> WeakToken = Token; - SwapIndex S(make_unique<MemIndex>(SymbolSlab(), MemIndex::OccurrenceMap(), - std::move(Token))); - EXPECT_FALSE(WeakToken.expired()); // Current MemIndex keeps it alive. - S.reset(make_unique<MemIndex>()); // Now the MemIndex is destroyed. - EXPECT_TRUE(WeakToken.expired()); // So the token is too. + SwapIndex S(llvm::make_unique<MemIndex>( + SymbolSlab(), MemIndex::OccurrenceMap(), std::move(Token))); + EXPECT_FALSE(WeakToken.expired()); // Current MemIndex keeps it alive. + S.reset(llvm::make_unique<MemIndex>()); // Now the MemIndex is destroyed. + EXPECT_TRUE(WeakToken.expired()); // So the token is too. } TEST(MemIndexTest, MemIndexDeduplicate) { |