summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/unittests/clang-doc/MergeTest.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-08-14 23:52:23 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-08-14 23:52:23 +0000
commit1c705d9c538d1d4a24f34e93be2582bc7e3a3da4 (patch)
tree924390752eb23cde6f2294d364f330ec18736f3c /clang-tools-extra/unittests/clang-doc/MergeTest.cpp
parent2b3d49b610bd2a45884115edcb21110bfa325f51 (diff)
downloadbcm5719-llvm-1c705d9c538d1d4a24f34e93be2582bc7e3a3da4.tar.gz
bcm5719-llvm-1c705d9c538d1d4a24f34e93be2582bc7e3a3da4.zip
[clang-tools-extra] 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: 368944
Diffstat (limited to 'clang-tools-extra/unittests/clang-doc/MergeTest.cpp')
-rw-r--r--clang-tools-extra/unittests/clang-doc/MergeTest.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/clang-tools-extra/unittests/clang-doc/MergeTest.cpp b/clang-tools-extra/unittests/clang-doc/MergeTest.cpp
index 89c68dd823a..7f738734dbd 100644
--- a/clang-tools-extra/unittests/clang-doc/MergeTest.cpp
+++ b/clang-tools-extra/unittests/clang-doc/MergeTest.cpp
@@ -43,10 +43,10 @@ TEST(MergeTest, mergeNamespaceInfos) {
Two.ChildEnums.back().Name = "TwoEnum";
std::vector<std::unique_ptr<Info>> Infos;
- Infos.emplace_back(llvm::make_unique<NamespaceInfo>(std::move(One)));
- Infos.emplace_back(llvm::make_unique<NamespaceInfo>(std::move(Two)));
+ Infos.emplace_back(std::make_unique<NamespaceInfo>(std::move(One)));
+ Infos.emplace_back(std::make_unique<NamespaceInfo>(std::move(Two)));
- auto Expected = llvm::make_unique<NamespaceInfo>();
+ auto Expected = std::make_unique<NamespaceInfo>();
Expected->Name = "Namespace";
Expected->Namespace.emplace_back(EmptySID, "A", InfoType::IT_namespace);
@@ -112,10 +112,10 @@ TEST(MergeTest, mergeRecordInfos) {
Two.ChildEnums.back().Name = "TwoEnum";
std::vector<std::unique_ptr<Info>> Infos;
- Infos.emplace_back(llvm::make_unique<RecordInfo>(std::move(One)));
- Infos.emplace_back(llvm::make_unique<RecordInfo>(std::move(Two)));
+ Infos.emplace_back(std::make_unique<RecordInfo>(std::move(One)));
+ Infos.emplace_back(std::make_unique<RecordInfo>(std::move(Two)));
- auto Expected = llvm::make_unique<RecordInfo>();
+ auto Expected = std::make_unique<RecordInfo>();
Expected->Name = "r";
Expected->Namespace.emplace_back(EmptySID, "A", InfoType::IT_namespace);
@@ -160,9 +160,9 @@ TEST(MergeTest, mergeFunctionInfos) {
One.Description.emplace_back();
auto OneFullComment = &One.Description.back();
OneFullComment->Kind = "FullComment";
- auto OneParagraphComment = llvm::make_unique<CommentInfo>();
+ auto OneParagraphComment = std::make_unique<CommentInfo>();
OneParagraphComment->Kind = "ParagraphComment";
- auto OneTextComment = llvm::make_unique<CommentInfo>();
+ auto OneTextComment = std::make_unique<CommentInfo>();
OneTextComment->Kind = "TextComment";
OneTextComment->Text = "This is a text comment.";
OneParagraphComment->Children.push_back(std::move(OneTextComment));
@@ -180,19 +180,19 @@ TEST(MergeTest, mergeFunctionInfos) {
Two.Description.emplace_back();
auto TwoFullComment = &Two.Description.back();
TwoFullComment->Kind = "FullComment";
- auto TwoParagraphComment = llvm::make_unique<CommentInfo>();
+ auto TwoParagraphComment = std::make_unique<CommentInfo>();
TwoParagraphComment->Kind = "ParagraphComment";
- auto TwoTextComment = llvm::make_unique<CommentInfo>();
+ auto TwoTextComment = std::make_unique<CommentInfo>();
TwoTextComment->Kind = "TextComment";
TwoTextComment->Text = "This is a text comment.";
TwoParagraphComment->Children.push_back(std::move(TwoTextComment));
TwoFullComment->Children.push_back(std::move(TwoParagraphComment));
std::vector<std::unique_ptr<Info>> Infos;
- Infos.emplace_back(llvm::make_unique<FunctionInfo>(std::move(One)));
- Infos.emplace_back(llvm::make_unique<FunctionInfo>(std::move(Two)));
+ Infos.emplace_back(std::make_unique<FunctionInfo>(std::move(One)));
+ Infos.emplace_back(std::make_unique<FunctionInfo>(std::move(Two)));
- auto Expected = llvm::make_unique<FunctionInfo>();
+ auto Expected = std::make_unique<FunctionInfo>();
Expected->Name = "f";
Expected->Namespace.emplace_back(EmptySID, "A", InfoType::IT_namespace);
@@ -207,9 +207,9 @@ TEST(MergeTest, mergeFunctionInfos) {
Expected->Description.emplace_back();
auto ExpectedFullComment = &Expected->Description.back();
ExpectedFullComment->Kind = "FullComment";
- auto ExpectedParagraphComment = llvm::make_unique<CommentInfo>();
+ auto ExpectedParagraphComment = std::make_unique<CommentInfo>();
ExpectedParagraphComment->Kind = "ParagraphComment";
- auto ExpectedTextComment = llvm::make_unique<CommentInfo>();
+ auto ExpectedTextComment = std::make_unique<CommentInfo>();
ExpectedTextComment->Kind = "TextComment";
ExpectedTextComment->Text = "This is a text comment.";
ExpectedParagraphComment->Children.push_back(std::move(ExpectedTextComment));
@@ -241,10 +241,10 @@ TEST(MergeTest, mergeEnumInfos) {
Two.Members.emplace_back("Y");
std::vector<std::unique_ptr<Info>> Infos;
- Infos.emplace_back(llvm::make_unique<EnumInfo>(std::move(One)));
- Infos.emplace_back(llvm::make_unique<EnumInfo>(std::move(Two)));
+ Infos.emplace_back(std::make_unique<EnumInfo>(std::move(One)));
+ Infos.emplace_back(std::make_unique<EnumInfo>(std::move(Two)));
- auto Expected = llvm::make_unique<EnumInfo>();
+ auto Expected = std::make_unique<EnumInfo>();
Expected->Name = "e";
Expected->Namespace.emplace_back(EmptySID, "A", InfoType::IT_namespace);
OpenPOWER on IntegriCloud