diff options
Diffstat (limited to 'clang-tools-extra/unittests')
10 files changed, 116 insertions, 116 deletions
diff --git a/clang-tools-extra/unittests/clang-doc/BitcodeTest.cpp b/clang-tools-extra/unittests/clang-doc/BitcodeTest.cpp index c2bfd6325c2..020d7dc0608 100644 --- a/clang-tools-extra/unittests/clang-doc/BitcodeTest.cpp +++ b/clang-tools-extra/unittests/clang-doc/BitcodeTest.cpp @@ -164,100 +164,100 @@ TEST(SerializeTest, emitInfoWithCommentBitcode) { CommentInfo Top; Top.Kind = "FullComment"; - Top.Children.emplace_back(llvm::make_unique<CommentInfo>()); + Top.Children.emplace_back(std::make_unique<CommentInfo>()); CommentInfo *BlankLine = Top.Children.back().get(); BlankLine->Kind = "ParagraphComment"; - BlankLine->Children.emplace_back(llvm::make_unique<CommentInfo>()); + BlankLine->Children.emplace_back(std::make_unique<CommentInfo>()); BlankLine->Children.back()->Kind = "TextComment"; - Top.Children.emplace_back(llvm::make_unique<CommentInfo>()); + Top.Children.emplace_back(std::make_unique<CommentInfo>()); CommentInfo *Brief = Top.Children.back().get(); Brief->Kind = "ParagraphComment"; - Brief->Children.emplace_back(llvm::make_unique<CommentInfo>()); + Brief->Children.emplace_back(std::make_unique<CommentInfo>()); Brief->Children.back()->Kind = "TextComment"; Brief->Children.back()->Name = "ParagraphComment"; Brief->Children.back()->Text = " Brief description."; - Top.Children.emplace_back(llvm::make_unique<CommentInfo>()); + Top.Children.emplace_back(std::make_unique<CommentInfo>()); CommentInfo *Extended = Top.Children.back().get(); Extended->Kind = "ParagraphComment"; - Extended->Children.emplace_back(llvm::make_unique<CommentInfo>()); + Extended->Children.emplace_back(std::make_unique<CommentInfo>()); Extended->Children.back()->Kind = "TextComment"; Extended->Children.back()->Text = " Extended description that"; - Extended->Children.emplace_back(llvm::make_unique<CommentInfo>()); + Extended->Children.emplace_back(std::make_unique<CommentInfo>()); Extended->Children.back()->Kind = "TextComment"; Extended->Children.back()->Text = " continues onto the next line."; - Top.Children.emplace_back(llvm::make_unique<CommentInfo>()); + Top.Children.emplace_back(std::make_unique<CommentInfo>()); CommentInfo *HTML = Top.Children.back().get(); HTML->Kind = "ParagraphComment"; - HTML->Children.emplace_back(llvm::make_unique<CommentInfo>()); + HTML->Children.emplace_back(std::make_unique<CommentInfo>()); HTML->Children.back()->Kind = "TextComment"; - HTML->Children.emplace_back(llvm::make_unique<CommentInfo>()); + HTML->Children.emplace_back(std::make_unique<CommentInfo>()); HTML->Children.back()->Kind = "HTMLStartTagComment"; HTML->Children.back()->Name = "ul"; HTML->Children.back()->AttrKeys.emplace_back("class"); HTML->Children.back()->AttrValues.emplace_back("test"); - HTML->Children.emplace_back(llvm::make_unique<CommentInfo>()); + HTML->Children.emplace_back(std::make_unique<CommentInfo>()); HTML->Children.back()->Kind = "HTMLStartTagComment"; HTML->Children.back()->Name = "li"; - HTML->Children.emplace_back(llvm::make_unique<CommentInfo>()); + HTML->Children.emplace_back(std::make_unique<CommentInfo>()); HTML->Children.back()->Kind = "TextComment"; HTML->Children.back()->Text = " Testing."; - HTML->Children.emplace_back(llvm::make_unique<CommentInfo>()); + HTML->Children.emplace_back(std::make_unique<CommentInfo>()); HTML->Children.back()->Kind = "HTMLEndTagComment"; HTML->Children.back()->Name = "ul"; HTML->Children.back()->SelfClosing = true; - Top.Children.emplace_back(llvm::make_unique<CommentInfo>()); + Top.Children.emplace_back(std::make_unique<CommentInfo>()); CommentInfo *Verbatim = Top.Children.back().get(); Verbatim->Kind = "VerbatimBlockComment"; Verbatim->Name = "verbatim"; Verbatim->CloseName = "endverbatim"; - Verbatim->Children.emplace_back(llvm::make_unique<CommentInfo>()); + Verbatim->Children.emplace_back(std::make_unique<CommentInfo>()); Verbatim->Children.back()->Kind = "VerbatimBlockLineComment"; Verbatim->Children.back()->Text = " The description continues."; - Top.Children.emplace_back(llvm::make_unique<CommentInfo>()); + Top.Children.emplace_back(std::make_unique<CommentInfo>()); CommentInfo *ParamOut = Top.Children.back().get(); ParamOut->Kind = "ParamCommandComment"; ParamOut->Direction = "[out]"; ParamOut->ParamName = "I"; ParamOut->Explicit = true; - ParamOut->Children.emplace_back(llvm::make_unique<CommentInfo>()); + ParamOut->Children.emplace_back(std::make_unique<CommentInfo>()); ParamOut->Children.back()->Kind = "ParagraphComment"; ParamOut->Children.back()->Children.emplace_back( - llvm::make_unique<CommentInfo>()); + std::make_unique<CommentInfo>()); ParamOut->Children.back()->Children.back()->Kind = "TextComment"; ParamOut->Children.back()->Children.emplace_back( - llvm::make_unique<CommentInfo>()); + std::make_unique<CommentInfo>()); ParamOut->Children.back()->Children.back()->Kind = "TextComment"; ParamOut->Children.back()->Children.back()->Text = " is a parameter."; - Top.Children.emplace_back(llvm::make_unique<CommentInfo>()); + Top.Children.emplace_back(std::make_unique<CommentInfo>()); CommentInfo *ParamIn = Top.Children.back().get(); ParamIn->Kind = "ParamCommandComment"; ParamIn->Direction = "[in]"; ParamIn->ParamName = "J"; - ParamIn->Children.emplace_back(llvm::make_unique<CommentInfo>()); + ParamIn->Children.emplace_back(std::make_unique<CommentInfo>()); ParamIn->Children.back()->Kind = "ParagraphComment"; ParamIn->Children.back()->Children.emplace_back( - llvm::make_unique<CommentInfo>()); + std::make_unique<CommentInfo>()); ParamIn->Children.back()->Children.back()->Kind = "TextComment"; ParamIn->Children.back()->Children.back()->Text = " is a parameter."; ParamIn->Children.back()->Children.emplace_back( - llvm::make_unique<CommentInfo>()); + std::make_unique<CommentInfo>()); ParamIn->Children.back()->Children.back()->Kind = "TextComment"; - Top.Children.emplace_back(llvm::make_unique<CommentInfo>()); + Top.Children.emplace_back(std::make_unique<CommentInfo>()); CommentInfo *Return = Top.Children.back().get(); Return->Kind = "BlockCommandComment"; Return->Name = "return"; Return->Explicit = true; - Return->Children.emplace_back(llvm::make_unique<CommentInfo>()); + Return->Children.emplace_back(std::make_unique<CommentInfo>()); Return->Children.back()->Kind = "ParagraphComment"; Return->Children.back()->Children.emplace_back( - llvm::make_unique<CommentInfo>()); + std::make_unique<CommentInfo>()); Return->Children.back()->Children.back()->Kind = "TextComment"; Return->Children.back()->Children.back()->Text = "void"; diff --git a/clang-tools-extra/unittests/clang-doc/GeneratorTest.cpp b/clang-tools-extra/unittests/clang-doc/GeneratorTest.cpp index c110345c1c5..932a5aed314 100644 --- a/clang-tools-extra/unittests/clang-doc/GeneratorTest.cpp +++ b/clang-tools-extra/unittests/clang-doc/GeneratorTest.cpp @@ -17,21 +17,21 @@ namespace doc { TEST(GeneratorTest, emitIndex) { Index Idx; - auto InfoA = llvm::make_unique<Info>(); + auto InfoA = std::make_unique<Info>(); InfoA->Name = "A"; InfoA->USR = serialize::hashUSR("1"); Generator::addInfoToIndex(Idx, InfoA.get()); - auto InfoC = llvm::make_unique<Info>(); + auto InfoC = std::make_unique<Info>(); InfoC->Name = "C"; InfoC->USR = serialize::hashUSR("3"); Reference RefB = Reference("B"); RefB.USR = serialize::hashUSR("2"); InfoC->Namespace = {std::move(RefB)}; Generator::addInfoToIndex(Idx, InfoC.get()); - auto InfoD = llvm::make_unique<Info>(); + auto InfoD = std::make_unique<Info>(); InfoD->Name = "D"; InfoD->USR = serialize::hashUSR("4"); - auto InfoF = llvm::make_unique<Info>(); + auto InfoF = std::make_unique<Info>(); InfoF->Name = "F"; InfoF->USR = serialize::hashUSR("6"); Reference RefD = Reference("D"); @@ -40,7 +40,7 @@ TEST(GeneratorTest, emitIndex) { RefE.USR = serialize::hashUSR("5"); InfoF->Namespace = {std::move(RefE), std::move(RefD)}; Generator::addInfoToIndex(Idx, InfoF.get()); - auto InfoG = llvm::make_unique<Info>(InfoType::IT_namespace); + auto InfoG = std::make_unique<Info>(InfoType::IT_namespace); Generator::addInfoToIndex(Idx, InfoG.get()); Index ExpectedIdx; diff --git a/clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp b/clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp index 901b75a706b..5d66d981d63 100644 --- a/clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp +++ b/clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp @@ -335,34 +335,34 @@ TEST(HTMLGeneratorTest, emitCommentHTML) { CommentInfo Top; Top.Kind = "FullComment"; - Top.Children.emplace_back(llvm::make_unique<CommentInfo>()); + Top.Children.emplace_back(std::make_unique<CommentInfo>()); CommentInfo *BlankLine = Top.Children.back().get(); BlankLine->Kind = "ParagraphComment"; - BlankLine->Children.emplace_back(llvm::make_unique<CommentInfo>()); + BlankLine->Children.emplace_back(std::make_unique<CommentInfo>()); BlankLine->Children.back()->Kind = "TextComment"; - Top.Children.emplace_back(llvm::make_unique<CommentInfo>()); + Top.Children.emplace_back(std::make_unique<CommentInfo>()); CommentInfo *Brief = Top.Children.back().get(); Brief->Kind = "ParagraphComment"; - Brief->Children.emplace_back(llvm::make_unique<CommentInfo>()); + Brief->Children.emplace_back(std::make_unique<CommentInfo>()); Brief->Children.back()->Kind = "TextComment"; Brief->Children.back()->Name = "ParagraphComment"; Brief->Children.back()->Text = " Brief description."; - Top.Children.emplace_back(llvm::make_unique<CommentInfo>()); + Top.Children.emplace_back(std::make_unique<CommentInfo>()); CommentInfo *Extended = Top.Children.back().get(); Extended->Kind = "ParagraphComment"; - Extended->Children.emplace_back(llvm::make_unique<CommentInfo>()); + Extended->Children.emplace_back(std::make_unique<CommentInfo>()); Extended->Children.back()->Kind = "TextComment"; Extended->Children.back()->Text = " Extended description that"; - Extended->Children.emplace_back(llvm::make_unique<CommentInfo>()); + Extended->Children.emplace_back(std::make_unique<CommentInfo>()); Extended->Children.back()->Kind = "TextComment"; Extended->Children.back()->Text = " continues onto the next line."; - Top.Children.emplace_back(llvm::make_unique<CommentInfo>()); + Top.Children.emplace_back(std::make_unique<CommentInfo>()); CommentInfo *Entities = Top.Children.back().get(); Entities->Kind = "ParagraphComment"; - Entities->Children.emplace_back(llvm::make_unique<CommentInfo>()); + Entities->Children.emplace_back(std::make_unique<CommentInfo>()); Entities->Children.back()->Kind = "TextComment"; Entities->Children.back()->Name = "ParagraphComment"; Entities->Children.back()->Text = diff --git a/clang-tools-extra/unittests/clang-doc/MDGeneratorTest.cpp b/clang-tools-extra/unittests/clang-doc/MDGeneratorTest.cpp index 3a35108fadf..1121782024d 100644 --- a/clang-tools-extra/unittests/clang-doc/MDGeneratorTest.cpp +++ b/clang-tools-extra/unittests/clang-doc/MDGeneratorTest.cpp @@ -217,100 +217,100 @@ TEST(MDGeneratorTest, emitCommentMD) { CommentInfo Top; Top.Kind = "FullComment"; - Top.Children.emplace_back(llvm::make_unique<CommentInfo>()); + Top.Children.emplace_back(std::make_unique<CommentInfo>()); CommentInfo *BlankLine = Top.Children.back().get(); BlankLine->Kind = "ParagraphComment"; - BlankLine->Children.emplace_back(llvm::make_unique<CommentInfo>()); + BlankLine->Children.emplace_back(std::make_unique<CommentInfo>()); BlankLine->Children.back()->Kind = "TextComment"; - Top.Children.emplace_back(llvm::make_unique<CommentInfo>()); + Top.Children.emplace_back(std::make_unique<CommentInfo>()); CommentInfo *Brief = Top.Children.back().get(); Brief->Kind = "ParagraphComment"; - Brief->Children.emplace_back(llvm::make_unique<CommentInfo>()); + Brief->Children.emplace_back(std::make_unique<CommentInfo>()); Brief->Children.back()->Kind = "TextComment"; Brief->Children.back()->Name = "ParagraphComment"; Brief->Children.back()->Text = " Brief description."; - Top.Children.emplace_back(llvm::make_unique<CommentInfo>()); + Top.Children.emplace_back(std::make_unique<CommentInfo>()); CommentInfo *Extended = Top.Children.back().get(); Extended->Kind = "ParagraphComment"; - Extended->Children.emplace_back(llvm::make_unique<CommentInfo>()); + Extended->Children.emplace_back(std::make_unique<CommentInfo>()); Extended->Children.back()->Kind = "TextComment"; Extended->Children.back()->Text = " Extended description that"; - Extended->Children.emplace_back(llvm::make_unique<CommentInfo>()); + Extended->Children.emplace_back(std::make_unique<CommentInfo>()); Extended->Children.back()->Kind = "TextComment"; Extended->Children.back()->Text = " continues onto the next line."; - Top.Children.emplace_back(llvm::make_unique<CommentInfo>()); + Top.Children.emplace_back(std::make_unique<CommentInfo>()); CommentInfo *HTML = Top.Children.back().get(); HTML->Kind = "ParagraphComment"; - HTML->Children.emplace_back(llvm::make_unique<CommentInfo>()); + HTML->Children.emplace_back(std::make_unique<CommentInfo>()); HTML->Children.back()->Kind = "TextComment"; - HTML->Children.emplace_back(llvm::make_unique<CommentInfo>()); + HTML->Children.emplace_back(std::make_unique<CommentInfo>()); HTML->Children.back()->Kind = "HTMLStartTagComment"; HTML->Children.back()->Name = "ul"; HTML->Children.back()->AttrKeys.emplace_back("class"); HTML->Children.back()->AttrValues.emplace_back("test"); - HTML->Children.emplace_back(llvm::make_unique<CommentInfo>()); + HTML->Children.emplace_back(std::make_unique<CommentInfo>()); HTML->Children.back()->Kind = "HTMLStartTagComment"; HTML->Children.back()->Name = "li"; - HTML->Children.emplace_back(llvm::make_unique<CommentInfo>()); + HTML->Children.emplace_back(std::make_unique<CommentInfo>()); HTML->Children.back()->Kind = "TextComment"; HTML->Children.back()->Text = " Testing."; - HTML->Children.emplace_back(llvm::make_unique<CommentInfo>()); + HTML->Children.emplace_back(std::make_unique<CommentInfo>()); HTML->Children.back()->Kind = "HTMLEndTagComment"; HTML->Children.back()->Name = "ul"; HTML->Children.back()->SelfClosing = true; - Top.Children.emplace_back(llvm::make_unique<CommentInfo>()); + Top.Children.emplace_back(std::make_unique<CommentInfo>()); CommentInfo *Verbatim = Top.Children.back().get(); Verbatim->Kind = "VerbatimBlockComment"; Verbatim->Name = "verbatim"; Verbatim->CloseName = "endverbatim"; - Verbatim->Children.emplace_back(llvm::make_unique<CommentInfo>()); + Verbatim->Children.emplace_back(std::make_unique<CommentInfo>()); Verbatim->Children.back()->Kind = "VerbatimBlockLineComment"; Verbatim->Children.back()->Text = " The description continues."; - Top.Children.emplace_back(llvm::make_unique<CommentInfo>()); + Top.Children.emplace_back(std::make_unique<CommentInfo>()); CommentInfo *ParamOut = Top.Children.back().get(); ParamOut->Kind = "ParamCommandComment"; ParamOut->Direction = "[out]"; ParamOut->ParamName = "I"; ParamOut->Explicit = true; - ParamOut->Children.emplace_back(llvm::make_unique<CommentInfo>()); + ParamOut->Children.emplace_back(std::make_unique<CommentInfo>()); ParamOut->Children.back()->Kind = "ParagraphComment"; ParamOut->Children.back()->Children.emplace_back( - llvm::make_unique<CommentInfo>()); + std::make_unique<CommentInfo>()); ParamOut->Children.back()->Children.back()->Kind = "TextComment"; ParamOut->Children.back()->Children.emplace_back( - llvm::make_unique<CommentInfo>()); + std::make_unique<CommentInfo>()); ParamOut->Children.back()->Children.back()->Kind = "TextComment"; ParamOut->Children.back()->Children.back()->Text = " is a parameter."; - Top.Children.emplace_back(llvm::make_unique<CommentInfo>()); + Top.Children.emplace_back(std::make_unique<CommentInfo>()); CommentInfo *ParamIn = Top.Children.back().get(); ParamIn->Kind = "ParamCommandComment"; ParamIn->Direction = "[in]"; ParamIn->ParamName = "J"; - ParamIn->Children.emplace_back(llvm::make_unique<CommentInfo>()); + ParamIn->Children.emplace_back(std::make_unique<CommentInfo>()); ParamIn->Children.back()->Kind = "ParagraphComment"; ParamIn->Children.back()->Children.emplace_back( - llvm::make_unique<CommentInfo>()); + std::make_unique<CommentInfo>()); ParamIn->Children.back()->Children.back()->Kind = "TextComment"; ParamIn->Children.back()->Children.back()->Text = " is a parameter."; ParamIn->Children.back()->Children.emplace_back( - llvm::make_unique<CommentInfo>()); + std::make_unique<CommentInfo>()); ParamIn->Children.back()->Children.back()->Kind = "TextComment"; - Top.Children.emplace_back(llvm::make_unique<CommentInfo>()); + Top.Children.emplace_back(std::make_unique<CommentInfo>()); CommentInfo *Return = Top.Children.back().get(); Return->Kind = "BlockCommandComment"; Return->Name = "return"; Return->Explicit = true; - Return->Children.emplace_back(llvm::make_unique<CommentInfo>()); + Return->Children.emplace_back(std::make_unique<CommentInfo>()); Return->Children.back()->Kind = "ParagraphComment"; Return->Children.back()->Children.emplace_back( - llvm::make_unique<CommentInfo>()); + std::make_unique<CommentInfo>()); Return->Children.back()->Children.back()->Kind = "TextComment"; Return->Children.back()->Children.back()->Text = "void"; 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); diff --git a/clang-tools-extra/unittests/clang-doc/YAMLGeneratorTest.cpp b/clang-tools-extra/unittests/clang-doc/YAMLGeneratorTest.cpp index efc08fdc21a..449bb5abf46 100644 --- a/clang-tools-extra/unittests/clang-doc/YAMLGeneratorTest.cpp +++ b/clang-tools-extra/unittests/clang-doc/YAMLGeneratorTest.cpp @@ -246,100 +246,100 @@ TEST(YAMLGeneratorTest, emitCommentYAML) { CommentInfo Top; Top.Kind = "FullComment"; - Top.Children.emplace_back(llvm::make_unique<CommentInfo>()); + Top.Children.emplace_back(std::make_unique<CommentInfo>()); CommentInfo *BlankLine = Top.Children.back().get(); BlankLine->Kind = "ParagraphComment"; - BlankLine->Children.emplace_back(llvm::make_unique<CommentInfo>()); + BlankLine->Children.emplace_back(std::make_unique<CommentInfo>()); BlankLine->Children.back()->Kind = "TextComment"; - Top.Children.emplace_back(llvm::make_unique<CommentInfo>()); + Top.Children.emplace_back(std::make_unique<CommentInfo>()); CommentInfo *Brief = Top.Children.back().get(); Brief->Kind = "ParagraphComment"; - Brief->Children.emplace_back(llvm::make_unique<CommentInfo>()); + Brief->Children.emplace_back(std::make_unique<CommentInfo>()); Brief->Children.back()->Kind = "TextComment"; Brief->Children.back()->Name = "ParagraphComment"; Brief->Children.back()->Text = " Brief description."; - Top.Children.emplace_back(llvm::make_unique<CommentInfo>()); + Top.Children.emplace_back(std::make_unique<CommentInfo>()); CommentInfo *Extended = Top.Children.back().get(); Extended->Kind = "ParagraphComment"; - Extended->Children.emplace_back(llvm::make_unique<CommentInfo>()); + Extended->Children.emplace_back(std::make_unique<CommentInfo>()); Extended->Children.back()->Kind = "TextComment"; Extended->Children.back()->Text = " Extended description that"; - Extended->Children.emplace_back(llvm::make_unique<CommentInfo>()); + Extended->Children.emplace_back(std::make_unique<CommentInfo>()); Extended->Children.back()->Kind = "TextComment"; Extended->Children.back()->Text = " continues onto the next line."; - Top.Children.emplace_back(llvm::make_unique<CommentInfo>()); + Top.Children.emplace_back(std::make_unique<CommentInfo>()); CommentInfo *HTML = Top.Children.back().get(); HTML->Kind = "ParagraphComment"; - HTML->Children.emplace_back(llvm::make_unique<CommentInfo>()); + HTML->Children.emplace_back(std::make_unique<CommentInfo>()); HTML->Children.back()->Kind = "TextComment"; - HTML->Children.emplace_back(llvm::make_unique<CommentInfo>()); + HTML->Children.emplace_back(std::make_unique<CommentInfo>()); HTML->Children.back()->Kind = "HTMLStartTagComment"; HTML->Children.back()->Name = "ul"; HTML->Children.back()->AttrKeys.emplace_back("class"); HTML->Children.back()->AttrValues.emplace_back("test"); - HTML->Children.emplace_back(llvm::make_unique<CommentInfo>()); + HTML->Children.emplace_back(std::make_unique<CommentInfo>()); HTML->Children.back()->Kind = "HTMLStartTagComment"; HTML->Children.back()->Name = "li"; - HTML->Children.emplace_back(llvm::make_unique<CommentInfo>()); + HTML->Children.emplace_back(std::make_unique<CommentInfo>()); HTML->Children.back()->Kind = "TextComment"; HTML->Children.back()->Text = " Testing."; - HTML->Children.emplace_back(llvm::make_unique<CommentInfo>()); + HTML->Children.emplace_back(std::make_unique<CommentInfo>()); HTML->Children.back()->Kind = "HTMLEndTagComment"; HTML->Children.back()->Name = "ul"; HTML->Children.back()->SelfClosing = true; - Top.Children.emplace_back(llvm::make_unique<CommentInfo>()); + Top.Children.emplace_back(std::make_unique<CommentInfo>()); CommentInfo *Verbatim = Top.Children.back().get(); Verbatim->Kind = "VerbatimBlockComment"; Verbatim->Name = "verbatim"; Verbatim->CloseName = "endverbatim"; - Verbatim->Children.emplace_back(llvm::make_unique<CommentInfo>()); + Verbatim->Children.emplace_back(std::make_unique<CommentInfo>()); Verbatim->Children.back()->Kind = "VerbatimBlockLineComment"; Verbatim->Children.back()->Text = " The description continues."; - Top.Children.emplace_back(llvm::make_unique<CommentInfo>()); + Top.Children.emplace_back(std::make_unique<CommentInfo>()); CommentInfo *ParamOut = Top.Children.back().get(); ParamOut->Kind = "ParamCommandComment"; ParamOut->Direction = "[out]"; ParamOut->ParamName = "I"; ParamOut->Explicit = true; - ParamOut->Children.emplace_back(llvm::make_unique<CommentInfo>()); + ParamOut->Children.emplace_back(std::make_unique<CommentInfo>()); ParamOut->Children.back()->Kind = "ParagraphComment"; ParamOut->Children.back()->Children.emplace_back( - llvm::make_unique<CommentInfo>()); + std::make_unique<CommentInfo>()); ParamOut->Children.back()->Children.back()->Kind = "TextComment"; ParamOut->Children.back()->Children.emplace_back( - llvm::make_unique<CommentInfo>()); + std::make_unique<CommentInfo>()); ParamOut->Children.back()->Children.back()->Kind = "TextComment"; ParamOut->Children.back()->Children.back()->Text = " is a parameter."; - Top.Children.emplace_back(llvm::make_unique<CommentInfo>()); + Top.Children.emplace_back(std::make_unique<CommentInfo>()); CommentInfo *ParamIn = Top.Children.back().get(); ParamIn->Kind = "ParamCommandComment"; ParamIn->Direction = "[in]"; ParamIn->ParamName = "J"; - ParamIn->Children.emplace_back(llvm::make_unique<CommentInfo>()); + ParamIn->Children.emplace_back(std::make_unique<CommentInfo>()); ParamIn->Children.back()->Kind = "ParagraphComment"; ParamIn->Children.back()->Children.emplace_back( - llvm::make_unique<CommentInfo>()); + std::make_unique<CommentInfo>()); ParamIn->Children.back()->Children.back()->Kind = "TextComment"; ParamIn->Children.back()->Children.back()->Text = " is a parameter."; ParamIn->Children.back()->Children.emplace_back( - llvm::make_unique<CommentInfo>()); + std::make_unique<CommentInfo>()); ParamIn->Children.back()->Children.back()->Kind = "TextComment"; - Top.Children.emplace_back(llvm::make_unique<CommentInfo>()); + Top.Children.emplace_back(std::make_unique<CommentInfo>()); CommentInfo *Return = Top.Children.back().get(); Return->Kind = "BlockCommandComment"; Return->Name = "return"; Return->Explicit = true; - Return->Children.emplace_back(llvm::make_unique<CommentInfo>()); + Return->Children.emplace_back(std::make_unique<CommentInfo>()); Return->Children.back()->Kind = "ParagraphComment"; Return->Children.back()->Children.emplace_back( - llvm::make_unique<CommentInfo>()); + std::make_unique<CommentInfo>()); Return->Children.back()->Children.back()->Kind = "TextComment"; Return->Children.back()->Children.back()->Text = "void"; diff --git a/clang-tools-extra/unittests/clang-include-fixer/IncludeFixerTest.cpp b/clang-tools-extra/unittests/clang-include-fixer/IncludeFixerTest.cpp index ab7ef7973a7..b21017160a2 100644 --- a/clang-tools-extra/unittests/clang-include-fixer/IncludeFixerTest.cpp +++ b/clang-tools-extra/unittests/clang-include-fixer/IncludeFixerTest.cpp @@ -92,9 +92,9 @@ static std::string runIncludeFixer( {SymbolInfo("foo2", SymbolInfo::SymbolKind::Class, "\"foo2.h\"", {}), SymbolInfo::Signals{}}, }; - auto SymbolIndexMgr = llvm::make_unique<SymbolIndexManager>(); + auto SymbolIndexMgr = std::make_unique<SymbolIndexManager>(); SymbolIndexMgr->addSymbolIndex( - [=]() { return llvm::make_unique<InMemorySymbolIndex>(Symbols); }); + [=]() { return std::make_unique<InMemorySymbolIndex>(Symbols); }); std::vector<IncludeFixerContext> FixerContexts; IncludeFixerActionFactory Factory(*SymbolIndexMgr, FixerContexts, "llvm"); diff --git a/clang-tools-extra/unittests/clang-move/ClangMoveTests.cpp b/clang-tools-extra/unittests/clang-move/ClangMoveTests.cpp index 721ffd95237..75a9826baf7 100644 --- a/clang-tools-extra/unittests/clang-move/ClangMoveTests.cpp +++ b/clang-tools-extra/unittests/clang-move/ClangMoveTests.cpp @@ -227,7 +227,7 @@ runClangMoveOnCode(const move::MoveDefinitionSpec &Spec, ClangMoveContext MoveContext = {Spec, FileToReplacements, WorkingDir, "LLVM", Reporter != nullptr}; - auto Factory = llvm::make_unique<clang::move::ClangMoveActionFactory>( + auto Factory = std::make_unique<clang::move::ClangMoveActionFactory>( &MoveContext, Reporter); // std::string IncludeArg = Twine("-I" + WorkingDir; diff --git a/clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h b/clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h index d1180d4ebfd..787679c68a3 100644 --- a/clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h +++ b/clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h @@ -40,7 +40,7 @@ template <typename Check> struct CheckFactory<Check> { static void createChecks(ClangTidyContext *Context, SmallVectorImpl<std::unique_ptr<ClangTidyCheck>> &Result) { - Result.emplace_back(llvm::make_unique<Check>( + Result.emplace_back(std::make_unique<Check>( "test-check-" + std::to_string(Result.size()), Context)); } }; @@ -88,7 +88,7 @@ runCheckOnCode(StringRef Code, std::vector<ClangTidyError> *Errors = nullptr, std::map<StringRef, StringRef>()) { ClangTidyOptions Options = ExtraOptions; Options.Checks = "*"; - ClangTidyContext Context(llvm::make_unique<DefaultOptionsProvider>( + ClangTidyContext Context(std::make_unique<DefaultOptionsProvider>( ClangTidyGlobalOptions(), Options)); ClangTidyDiagnosticConsumer DiagConsumer(Context); DiagnosticsEngine DE(new DiagnosticIDs(), new DiagnosticOptions, diff --git a/clang-tools-extra/unittests/clang-tidy/IncludeInserterTest.cpp b/clang-tools-extra/unittests/clang-tidy/IncludeInserterTest.cpp index 89b25671374..890599cbc97 100644 --- a/clang-tools-extra/unittests/clang-tidy/IncludeInserterTest.cpp +++ b/clang-tools-extra/unittests/clang-tidy/IncludeInserterTest.cpp @@ -33,7 +33,7 @@ public: void registerPPCallbacks(const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) override { - Inserter = llvm::make_unique<utils::IncludeInserter>( + Inserter = std::make_unique<utils::IncludeInserter>( SM, getLangOpts(), utils::IncludeSorter::IS_Google); PP->addPPCallbacks(Inserter->CreatePPCallbacks()); } |