[clang-tools-extra] r341321 - [clangd] Fix ambiguous make_unique with c++17. NFC
Sam McCall via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 3 08:23:01 PDT 2018
Author: sammccall
Date: Mon Sep 3 08:23:01 2018
New Revision: 341321
URL: http://llvm.org/viewvc/llvm-project?rev=341321&view=rev
Log:
[clangd] Fix ambiguous make_unique with c++17. NFC
Modified:
clang-tools-extra/trunk/unittests/clangd/IndexTests.cpp
Modified: clang-tools-extra/trunk/unittests/clangd/IndexTests.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/clangd/IndexTests.cpp?rev=341321&r1=341320&r2=341321&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/clangd/IndexTests.cpp (original)
+++ clang-tools-extra/trunk/unittests/clangd/IndexTests.cpp Mon Sep 3 08:23:01 2018
@@ -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) {
More information about the cfe-commits
mailing list