Index: clang-tools-extra/clang-change-namespace/ChangeNamespace.cpp =================================================================== --- clang-tools-extra/clang-change-namespace/ChangeNamespace.cpp +++ clang-tools-extra/clang-change-namespace/ChangeNamespace.cpp @@ -109,7 +109,7 @@ const char *TokBegin = File.data() + LocInfo.second; // Lex from the start of the given location. - return llvm::make_unique(SM.getLocForStartOfFile(LocInfo.first), + return std::make_unique(SM.getLocForStartOfFile(LocInfo.first), LangOpts, File.begin(), TokBegin, File.end()); } Index: clang-tools-extra/clang-doc/BitcodeReader.cpp =================================================================== --- clang-tools-extra/clang-doc/BitcodeReader.cpp +++ clang-tools-extra/clang-doc/BitcodeReader.cpp @@ -329,7 +329,7 @@ } template <> llvm::Expected getCommentInfo(CommentInfo *I) { - I->Children.emplace_back(llvm::make_unique()); + I->Children.emplace_back(std::make_unique()); return I->Children.back().get(); } @@ -690,7 +690,7 @@ template llvm::Expected> ClangDocBitcodeReader::createInfo(unsigned ID) { - std::unique_ptr I = llvm::make_unique(); + std::unique_ptr I = std::make_unique(); if (auto Err = readBlock(ID, static_cast(I.get()))) return std::move(Err); return std::unique_ptr{std::move(I)}; Index: clang-tools-extra/clang-doc/ClangDoc.cpp =================================================================== --- clang-tools-extra/clang-doc/ClangDoc.cpp +++ clang-tools-extra/clang-doc/ClangDoc.cpp @@ -43,7 +43,7 @@ std::unique_ptr CreateASTConsumer(clang::CompilerInstance &Compiler, llvm::StringRef InFile) override { - return llvm::make_unique(&Compiler.getASTContext(), CDCtx); + return std::make_unique(&Compiler.getASTContext(), CDCtx); } private: @@ -54,7 +54,7 @@ std::unique_ptr newMapperActionFactory(ClangDocContext CDCtx) { - return llvm::make_unique(CDCtx); + return std::make_unique(CDCtx); } } // namespace doc Index: clang-tools-extra/clang-doc/HTMLGenerator.cpp =================================================================== --- clang-tools-extra/clang-doc/HTMLGenerator.cpp +++ clang-tools-extra/clang-doc/HTMLGenerator.cpp @@ -79,7 +79,7 @@ struct TagNode : public HTMLNode { TagNode(HTMLTag Tag) : HTMLNode(NodeType::NODE_TAG), Tag(Tag) {} TagNode(HTMLTag Tag, const Twine &Text) : TagNode(Tag) { - Children.emplace_back(llvm::make_unique(Text.str())); + Children.emplace_back(std::make_unique(Text.str())); } HTMLTag Tag; // Name of HTML Tag (p, div, h1) @@ -254,7 +254,7 @@ genStylesheetsHTML(StringRef InfoPath, const ClangDocContext &CDCtx) { std::vector> Out; for (const auto &FilePath : CDCtx.UserStylesheets) { - auto LinkNode = llvm::make_unique(HTMLTag::TAG_LINK); + auto LinkNode = std::make_unique(HTMLTag::TAG_LINK); LinkNode->Attributes.try_emplace("rel", "stylesheet"); SmallString<128> StylesheetPath = computeRelativePath("", InfoPath); llvm::sys::path::append(StylesheetPath, @@ -271,7 +271,7 @@ genJsScriptsHTML(StringRef InfoPath, const ClangDocContext &CDCtx) { std::vector> Out; for (const auto &FilePath : CDCtx.JsScripts) { - auto ScriptNode = llvm::make_unique(HTMLTag::TAG_SCRIPT); + auto ScriptNode = std::make_unique(HTMLTag::TAG_SCRIPT); SmallString<128> ScriptPath = computeRelativePath("", InfoPath); llvm::sys::path::append(ScriptPath, llvm::sys::path::filename(FilePath)); // Paths in HTML must be in posix-style @@ -283,7 +283,7 @@ } static std::unique_ptr genLink(const Twine &Text, const Twine &Link) { - auto LinkNode = llvm::make_unique(HTMLTag::TAG_A, Text); + auto LinkNode = std::make_unique(HTMLTag::TAG_A, Text); LinkNode->Attributes.try_emplace("href", Link.str()); return LinkNode; } @@ -293,7 +293,7 @@ llvm::Optional JumpToSection = None) { if (Type.Path.empty() && !Type.IsInGlobalNamespace) { if (!JumpToSection) - return llvm::make_unique(Type.Name); + return std::make_unique(Type.Name); else return genLink(Type.Name, "#" + JumpToSection.getValue()); } @@ -313,7 +313,7 @@ std::vector> Out; for (const auto &R : Refs) { if (&R != Refs.begin()) - Out.emplace_back(llvm::make_unique(", ")); + Out.emplace_back(std::make_unique(", ")); Out.emplace_back(genReference(R, CurrentDirectory)); } return Out; @@ -332,9 +332,9 @@ return {}; std::vector> Out; - Out.emplace_back(llvm::make_unique(HTMLTag::TAG_H2, "Enums")); + Out.emplace_back(std::make_unique(HTMLTag::TAG_H2, "Enums")); Out.back()->Attributes.try_emplace("id", "Enums"); - Out.emplace_back(llvm::make_unique(HTMLTag::TAG_DIV)); + Out.emplace_back(std::make_unique(HTMLTag::TAG_DIV)); auto &DivBody = Out.back(); for (const auto &E : Enums) { std::vector> Nodes = genHTML(E, CDCtx); @@ -348,9 +348,9 @@ if (Members.empty()) return nullptr; - auto List = llvm::make_unique(HTMLTag::TAG_UL); + auto List = std::make_unique(HTMLTag::TAG_UL); for (const auto &M : Members) - List->Children.emplace_back(llvm::make_unique(HTMLTag::TAG_LI, M)); + List->Children.emplace_back(std::make_unique(HTMLTag::TAG_LI, M)); return List; } @@ -361,9 +361,9 @@ return {}; std::vector> Out; - Out.emplace_back(llvm::make_unique(HTMLTag::TAG_H2, "Functions")); + Out.emplace_back(std::make_unique(HTMLTag::TAG_H2, "Functions")); Out.back()->Attributes.try_emplace("id", "Functions"); - Out.emplace_back(llvm::make_unique(HTMLTag::TAG_DIV)); + Out.emplace_back(std::make_unique(HTMLTag::TAG_DIV)); auto &DivBody = Out.back(); for (const auto &F : Functions) { std::vector> Nodes = @@ -380,18 +380,18 @@ return {}; std::vector> Out; - Out.emplace_back(llvm::make_unique(HTMLTag::TAG_H2, "Members")); + Out.emplace_back(std::make_unique(HTMLTag::TAG_H2, "Members")); Out.back()->Attributes.try_emplace("id", "Members"); - Out.emplace_back(llvm::make_unique(HTMLTag::TAG_UL)); + Out.emplace_back(std::make_unique(HTMLTag::TAG_UL)); auto &ULBody = Out.back(); for (const auto &M : Members) { std::string Access = getAccess(M.Access); if (Access != "") Access = Access + " "; - auto LIBody = llvm::make_unique(HTMLTag::TAG_LI); - LIBody->Children.emplace_back(llvm::make_unique(Access)); + auto LIBody = std::make_unique(HTMLTag::TAG_LI); + LIBody->Children.emplace_back(std::make_unique(Access)); LIBody->Children.emplace_back(genReference(M.Type, ParentInfoDir)); - LIBody->Children.emplace_back(llvm::make_unique(" " + M.Name)); + LIBody->Children.emplace_back(std::make_unique(" " + M.Name)); ULBody->Children.emplace_back(std::move(LIBody)); } return Out; @@ -404,12 +404,12 @@ return {}; std::vector> Out; - Out.emplace_back(llvm::make_unique(HTMLTag::TAG_H2, Title)); + Out.emplace_back(std::make_unique(HTMLTag::TAG_H2, Title)); Out.back()->Attributes.try_emplace("id", Title); - Out.emplace_back(llvm::make_unique(HTMLTag::TAG_UL)); + Out.emplace_back(std::make_unique(HTMLTag::TAG_UL)); auto &ULBody = Out.back(); for (const auto &R : References) { - auto LiNode = llvm::make_unique(HTMLTag::TAG_LI); + auto LiNode = std::make_unique(HTMLTag::TAG_LI); LiNode->Children.emplace_back(genReference(R, ParentPath)); ULBody->Children.emplace_back(std::move(LiNode)); } @@ -420,22 +420,22 @@ writeFileDefinition(const Location &L, llvm::Optional RepositoryUrl = None) { if (!L.IsFileInRootDir || !RepositoryUrl) - return llvm::make_unique( + return std::make_unique( HTMLTag::TAG_P, "Defined at line " + std::to_string(L.LineNumber) + " of file " + L.Filename); SmallString<128> FileURL(RepositoryUrl.getValue()); llvm::sys::path::append(FileURL, llvm::sys::path::Style::posix, L.Filename); - auto Node = llvm::make_unique(HTMLTag::TAG_P); - Node->Children.emplace_back(llvm::make_unique("Defined at line ")); + auto Node = std::make_unique(HTMLTag::TAG_P); + Node->Children.emplace_back(std::make_unique("Defined at line ")); auto LocNumberNode = - llvm::make_unique(HTMLTag::TAG_A, std::to_string(L.LineNumber)); + std::make_unique(HTMLTag::TAG_A, std::to_string(L.LineNumber)); // The links to a specific line in the source code use the github / // googlesource notation so it won't work for all hosting pages. LocNumberNode->Attributes.try_emplace( "href", (FileURL + "#" + std::to_string(L.LineNumber)).str()); Node->Children.emplace_back(std::move(LocNumberNode)); - Node->Children.emplace_back(llvm::make_unique(" of file ")); - auto LocFileNode = llvm::make_unique( + Node->Children.emplace_back(std::make_unique(" of file ")); + auto LocFileNode = std::make_unique( HTMLTag::TAG_A, llvm::sys::path::filename(FileURL)); LocFileNode->Attributes.try_emplace("href", FileURL); Node->Children.emplace_back(std::move(LocFileNode)); @@ -446,10 +446,10 @@ genCommonFileNodes(StringRef Title, StringRef InfoPath, const ClangDocContext &CDCtx) { std::vector> Out; - auto MetaNode = llvm::make_unique(HTMLTag::TAG_META); + auto MetaNode = std::make_unique(HTMLTag::TAG_META); MetaNode->Attributes.try_emplace("charset", "utf-8"); Out.emplace_back(std::move(MetaNode)); - Out.emplace_back(llvm::make_unique(HTMLTag::TAG_TITLE, Title)); + Out.emplace_back(std::make_unique(HTMLTag::TAG_TITLE, Title)); std::vector> StylesheetsNodes = genStylesheetsHTML(InfoPath, CDCtx); AppendVector(std::move(StylesheetsNodes), Out); @@ -457,7 +457,7 @@ genJsScriptsHTML(InfoPath, CDCtx); AppendVector(std::move(JsNodes), Out); // An empty
is generated but the index will be then rendered here - auto IndexNode = llvm::make_unique(HTMLTag::TAG_DIV); + auto IndexNode = std::make_unique(HTMLTag::TAG_DIV); IndexNode->Attributes.try_emplace("id", "index"); IndexNode->Attributes.try_emplace("path", InfoPath); Out.emplace_back(std::move(IndexNode)); @@ -478,7 +478,7 @@ StringRef InfoPath) { std::vector> Out; if (!Index.Name.empty()) { - Out.emplace_back(llvm::make_unique(HTMLTag::TAG_SPAN)); + Out.emplace_back(std::make_unique(HTMLTag::TAG_SPAN)); auto &SpanBody = Out.back(); if (!Index.JumpToSection) SpanBody->Children.emplace_back(genReference(Index, InfoPath)); @@ -488,10 +488,10 @@ } if (Index.Children.empty()) return Out; - Out.emplace_back(llvm::make_unique(HTMLTag::TAG_UL)); + Out.emplace_back(std::make_unique(HTMLTag::TAG_UL)); const auto &UlBody = Out.back(); for (const auto &C : Index.Children) { - auto LiBody = llvm::make_unique(HTMLTag::TAG_LI); + auto LiBody = std::make_unique(HTMLTag::TAG_LI); std::vector> Nodes = genHTML(C, InfoPath); AppendVector(std::move(Nodes), LiBody->Children); UlBody->Children.emplace_back(std::move(LiBody)); @@ -501,7 +501,7 @@ static std::unique_ptr genHTML(const CommentInfo &I) { if (I.Kind == "FullComment") { - auto FullComment = llvm::make_unique(HTMLTag::TAG_DIV); + auto FullComment = std::make_unique(HTMLTag::TAG_DIV); for (const auto &Child : I.Children) { std::unique_ptr Node = genHTML(*Child); if (Node) @@ -509,7 +509,7 @@ } return std::move(FullComment); } else if (I.Kind == "ParagraphComment") { - auto ParagraphComment = llvm::make_unique(HTMLTag::TAG_P); + auto ParagraphComment = std::make_unique(HTMLTag::TAG_P); for (const auto &Child : I.Children) { std::unique_ptr Node = genHTML(*Child); if (Node) @@ -521,13 +521,13 @@ } else if (I.Kind == "TextComment") { if (I.Text == "") return nullptr; - return llvm::make_unique(I.Text); + return std::make_unique(I.Text); } return nullptr; } static std::unique_ptr genHTML(const std::vector &C) { - auto CommentBlock = llvm::make_unique(HTMLTag::TAG_DIV); + auto CommentBlock = std::make_unique(HTMLTag::TAG_DIV); for (const auto &Child : C) { if (std::unique_ptr Node = genHTML(Child)) CommentBlock->Children.emplace_back(std::move(Node)); @@ -545,7 +545,7 @@ EnumType = "enum "; Out.emplace_back( - llvm::make_unique(HTMLTag::TAG_H3, EnumType + I.Name)); + std::make_unique(HTMLTag::TAG_H3, EnumType + I.Name)); Out.back()->Attributes.try_emplace("id", llvm::toHex(llvm::toStringRef(I.USR))); @@ -572,35 +572,35 @@ genHTML(const FunctionInfo &I, const ClangDocContext &CDCtx, StringRef ParentInfoDir) { std::vector> Out; - Out.emplace_back(llvm::make_unique(HTMLTag::TAG_H3, I.Name)); + Out.emplace_back(std::make_unique(HTMLTag::TAG_H3, I.Name)); // USR is used as id for functions instead of name to disambiguate function // overloads. Out.back()->Attributes.try_emplace("id", llvm::toHex(llvm::toStringRef(I.USR))); - Out.emplace_back(llvm::make_unique(HTMLTag::TAG_P)); + Out.emplace_back(std::make_unique(HTMLTag::TAG_P)); auto &FunctionHeader = Out.back(); std::string Access = getAccess(I.Access); if (Access != "") FunctionHeader->Children.emplace_back( - llvm::make_unique(Access + " ")); + std::make_unique(Access + " ")); if (I.ReturnType.Type.Name != "") { FunctionHeader->Children.emplace_back( genReference(I.ReturnType.Type, ParentInfoDir)); - FunctionHeader->Children.emplace_back(llvm::make_unique(" ")); + FunctionHeader->Children.emplace_back(std::make_unique(" ")); } FunctionHeader->Children.emplace_back( - llvm::make_unique(I.Name + "(")); + std::make_unique(I.Name + "(")); for (const auto &P : I.Params) { if (&P != I.Params.begin()) - FunctionHeader->Children.emplace_back(llvm::make_unique(", ")); + FunctionHeader->Children.emplace_back(std::make_unique(", ")); FunctionHeader->Children.emplace_back(genReference(P.Type, ParentInfoDir)); FunctionHeader->Children.emplace_back( - llvm::make_unique(" " + P.Name)); + std::make_unique(" " + P.Name)); } - FunctionHeader->Children.emplace_back(llvm::make_unique(")")); + FunctionHeader->Children.emplace_back(std::make_unique(")")); if (I.DefLoc) { if (!CDCtx.RepositoryUrl) @@ -626,7 +626,7 @@ else InfoTitle = ("namespace " + I.Name).str(); - Out.emplace_back(llvm::make_unique(HTMLTag::TAG_H1, InfoTitle)); + Out.emplace_back(std::make_unique(HTMLTag::TAG_H1, InfoTitle)); std::string Description; if (!I.Description.empty()) @@ -664,7 +664,7 @@ std::string &InfoTitle) { std::vector> Out; InfoTitle = (getTagType(I.TagType) + " " + I.Name).str(); - Out.emplace_back(llvm::make_unique(HTMLTag::TAG_H1, InfoTitle)); + Out.emplace_back(std::make_unique(HTMLTag::TAG_H1, InfoTitle)); if (I.DefLoc) { if (!CDCtx.RepositoryUrl) @@ -683,16 +683,16 @@ std::vector> VParents = genReferenceList(I.VirtualParents, I.Path); if (!Parents.empty() || !VParents.empty()) { - Out.emplace_back(llvm::make_unique(HTMLTag::TAG_P)); + Out.emplace_back(std::make_unique(HTMLTag::TAG_P)); auto &PBody = Out.back(); - PBody->Children.emplace_back(llvm::make_unique("Inherits from ")); + PBody->Children.emplace_back(std::make_unique("Inherits from ")); if (Parents.empty()) AppendVector(std::move(VParents), PBody->Children); else if (VParents.empty()) AppendVector(std::move(Parents), PBody->Children); else { AppendVector(std::move(Parents), PBody->Children); - PBody->Children.emplace_back(llvm::make_unique(", ")); + PBody->Children.emplace_back(std::make_unique(", ")); AppendVector(std::move(VParents), PBody->Children); } } @@ -740,7 +740,7 @@ const ClangDocContext &CDCtx) { HTMLFile F; std::string InfoTitle; - auto MainContentNode = llvm::make_unique(HTMLTag::TAG_DIV); + auto MainContentNode = std::make_unique(HTMLTag::TAG_DIV); Index InfoIndex; switch (I->IT) { case InfoType::IT_namespace: { Index: clang-tools-extra/clang-doc/Representation.cpp =================================================================== --- clang-tools-extra/clang-doc/Representation.cpp +++ clang-tools-extra/clang-doc/Representation.cpp @@ -36,7 +36,7 @@ if (Values.empty()) return llvm::make_error(" No values to reduce.\n", llvm::inconvertibleErrorCode()); - std::unique_ptr Merged = llvm::make_unique(Values[0]->USR); + std::unique_ptr Merged = std::make_unique(Values[0]->USR); T *Tmp = static_cast(Merged.get()); for (auto &I : Values) Tmp->merge(std::move(*static_cast(I.get()))); Index: clang-tools-extra/clang-doc/Serialize.cpp =================================================================== --- clang-tools-extra/clang-doc/Serialize.cpp +++ clang-tools-extra/clang-doc/Serialize.cpp @@ -90,7 +90,7 @@ ConstCommentVisitor::visit(C); for (comments::Comment *Child : llvm::make_range(C->child_begin(), C->child_end())) { - CurrentCI.Children.emplace_back(llvm::make_unique()); + CurrentCI.Children.emplace_back(std::make_unique()); ClangDocCommentVisitor Visitor(*CurrentCI.Children.back()); Visitor.parseComment(Child); } @@ -379,7 +379,7 @@ std::pair, std::unique_ptr> emitInfo(const NamespaceDecl *D, const FullComment *FC, int LineNumber, llvm::StringRef File, bool IsFileInRootDir, bool PublicOnly) { - auto I = llvm::make_unique(); + auto I = std::make_unique(); bool IsInAnonymousNamespace = false; populateInfo(*I, D, FC, IsInAnonymousNamespace); if (PublicOnly && ((IsInAnonymousNamespace || D->isAnonymousNamespace()) || @@ -392,7 +392,7 @@ if (I->Namespace.empty() && I->USR == SymbolID()) return {std::unique_ptr{std::move(I)}, nullptr}; - auto ParentI = llvm::make_unique(); + auto ParentI = std::make_unique(); ParentI->USR = I->Namespace.empty() ? SymbolID() : I->Namespace[0].USR; ParentI->ChildNamespaces.emplace_back(I->USR, I->Name, InfoType::IT_namespace, getInfoRelativePath(I->Namespace)); @@ -405,7 +405,7 @@ std::pair, std::unique_ptr> emitInfo(const RecordDecl *D, const FullComment *FC, int LineNumber, llvm::StringRef File, bool IsFileInRootDir, bool PublicOnly) { - auto I = llvm::make_unique(); + auto I = std::make_unique(); bool IsInAnonymousNamespace = false; populateSymbolInfo(*I, D, FC, LineNumber, File, IsFileInRootDir, IsInAnonymousNamespace); @@ -425,7 +425,7 @@ I->Path = getInfoRelativePath(I->Namespace); if (I->Namespace.empty()) { - auto ParentI = llvm::make_unique(); + auto ParentI = std::make_unique(); ParentI->USR = SymbolID(); ParentI->ChildRecords.emplace_back(I->USR, I->Name, InfoType::IT_record, getInfoRelativePath(I->Namespace)); @@ -436,7 +436,7 @@ switch (I->Namespace[0].RefType) { case InfoType::IT_namespace: { - auto ParentI = llvm::make_unique(); + auto ParentI = std::make_unique(); ParentI->USR = I->Namespace[0].USR; ParentI->ChildRecords.emplace_back(I->USR, I->Name, InfoType::IT_record, getInfoRelativePath(I->Namespace)); @@ -444,7 +444,7 @@ std::unique_ptr{std::move(ParentI)}}; } case InfoType::IT_record: { - auto ParentI = llvm::make_unique(); + auto ParentI = std::make_unique(); ParentI->USR = I->Namespace[0].USR; ParentI->ChildRecords.emplace_back(I->USR, I->Name, InfoType::IT_record, getInfoRelativePath(I->Namespace)); @@ -470,7 +470,7 @@ Func.Access = clang::AccessSpecifier::AS_none; // Wrap in enclosing scope - auto ParentI = llvm::make_unique(); + auto ParentI = std::make_unique(); if (!Func.Namespace.empty()) ParentI->USR = Func.Namespace[0].USR; else @@ -508,7 +508,7 @@ Func.Access = D->getAccess(); // Wrap in enclosing scope - auto ParentI = llvm::make_unique(); + auto ParentI = std::make_unique(); ParentI->USR = ParentUSR; if (Func.Namespace.empty()) ParentI->Path = getInfoRelativePath(ParentI->Namespace); @@ -533,7 +533,7 @@ // Put in global namespace if (Enum.Namespace.empty()) { - auto ParentI = llvm::make_unique(); + auto ParentI = std::make_unique(); ParentI->USR = SymbolID(); ParentI->ChildEnums.emplace_back(std::move(Enum)); ParentI->Path = getInfoRelativePath(ParentI->Namespace); @@ -545,7 +545,7 @@ // Wrap in enclosing scope switch (Enum.Namespace[0].RefType) { case InfoType::IT_namespace: { - auto ParentI = llvm::make_unique(); + auto ParentI = std::make_unique(); ParentI->USR = Enum.Namespace[0].USR; ParentI->ChildEnums.emplace_back(std::move(Enum)); // Info is wrapped in its parent scope so it's returned in the second @@ -553,7 +553,7 @@ return {nullptr, std::unique_ptr{std::move(ParentI)}}; } case InfoType::IT_record: { - auto ParentI = llvm::make_unique(); + auto ParentI = std::make_unique(); ParentI->USR = Enum.Namespace[0].USR; ParentI->ChildEnums.emplace_back(std::move(Enum)); // Info is wrapped in its parent scope so it's returned in the second Index: clang-tools-extra/clang-include-fixer/FuzzySymbolIndex.cpp =================================================================== --- clang-tools-extra/clang-include-fixer/FuzzySymbolIndex.cpp +++ clang-tools-extra/clang-include-fixer/FuzzySymbolIndex.cpp @@ -134,7 +134,7 @@ auto Buffer = llvm::MemoryBuffer::getFile(FilePath); if (!Buffer) return llvm::errorCodeToError(Buffer.getError()); - return llvm::make_unique( + return std::make_unique( find_all_symbols::ReadSymbolInfosFromYAML(Buffer.get()->getBuffer())); } Index: clang-tools-extra/clang-include-fixer/IncludeFixer.cpp =================================================================== --- clang-tools-extra/clang-include-fixer/IncludeFixer.cpp +++ clang-tools-extra/clang-include-fixer/IncludeFixer.cpp @@ -34,7 +34,7 @@ CreateASTConsumer(clang::CompilerInstance &Compiler, StringRef InFile) override { SemaSource.setFilePath(InFile); - return llvm::make_unique(); + return std::make_unique(); } void ExecuteAction() override { @@ -104,7 +104,7 @@ // Run the parser, gather missing includes. auto ScopedToolAction = - llvm::make_unique(SymbolIndexMgr, MinimizeIncludePaths); + std::make_unique(SymbolIndexMgr, MinimizeIncludePaths); Compiler.ExecuteAction(*ScopedToolAction); Contexts.push_back(ScopedToolAction->getIncludeFixerContext( Index: clang-tools-extra/clang-include-fixer/find-all-symbols/FindAllSymbolsAction.cpp =================================================================== --- clang-tools-extra/clang-include-fixer/find-all-symbols/FindAllSymbolsAction.cpp +++ clang-tools-extra/clang-include-fixer/find-all-symbols/FindAllSymbolsAction.cpp @@ -27,7 +27,7 @@ FindAllSymbolsAction::CreateASTConsumer(CompilerInstance &Compiler, StringRef InFile) { Compiler.getPreprocessor().addCommentHandler(&Handler); - Compiler.getPreprocessor().addPPCallbacks(llvm::make_unique( + Compiler.getPreprocessor().addPPCallbacks(std::make_unique( Reporter, &Compiler.getSourceManager(), &Collector)); return MatchFinder.newASTConsumer(); } Index: clang-tools-extra/clang-include-fixer/find-all-symbols/tool/FindAllSymbolsMain.cpp =================================================================== --- clang-tools-extra/clang-include-fixer/find-all-symbols/tool/FindAllSymbolsMain.cpp +++ clang-tools-extra/clang-include-fixer/find-all-symbols/tool/FindAllSymbolsMain.cpp @@ -145,7 +145,7 @@ clang::find_all_symbols::YamlReporter Reporter; auto Factory = - llvm::make_unique( + std::make_unique( &Reporter, clang::find_all_symbols::getSTLPostfixHeaderMap()); return Tool.run(Factory.get()); } Index: clang-tools-extra/clang-include-fixer/plugin/IncludeFixerPlugin.cpp =================================================================== --- clang-tools-extra/clang-include-fixer/plugin/IncludeFixerPlugin.cpp +++ clang-tools-extra/clang-include-fixer/plugin/IncludeFixerPlugin.cpp @@ -41,7 +41,7 @@ CI.setExternalSemaSource(SemaSource); SemaSource->setFilePath(InFile); SemaSource->setCompilerInstance(&CI); - return llvm::make_unique(SymbolIndexMgr); + return std::make_unique(SymbolIndexMgr); } void ExecuteAction() override {} // Do nothing. Index: clang-tools-extra/clang-include-fixer/tool/ClangIncludeFixer.cpp =================================================================== --- clang-tools-extra/clang-include-fixer/tool/ClangIncludeFixer.cpp +++ clang-tools-extra/clang-include-fixer/tool/ClangIncludeFixer.cpp @@ -161,7 +161,7 @@ createSymbolIndexManager(StringRef FilePath) { using find_all_symbols::SymbolInfo; - auto SymbolIndexMgr = llvm::make_unique(); + auto SymbolIndexMgr = std::make_unique(); switch (DatabaseFormat) { case fixed: { // Parse input and fill the database with it. @@ -185,7 +185,7 @@ /*Used=*/0)}); } SymbolIndexMgr->addSymbolIndex([=]() { - return llvm::make_unique(Symbols); + return std::make_unique(Symbols); }); break; } Index: clang-tools-extra/clang-move/HelperDeclRefGraph.cpp =================================================================== --- clang-tools-extra/clang-move/HelperDeclRefGraph.cpp +++ clang-tools-extra/clang-move/HelperDeclRefGraph.cpp @@ -59,7 +59,7 @@ if (Node) return Node.get(); - Node = llvm::make_unique(F); + Node = std::make_unique(F); return Node.get(); } Index: clang-tools-extra/clang-move/Move.cpp =================================================================== --- clang-tools-extra/clang-move/Move.cpp +++ clang-tools-extra/clang-move/Move.cpp @@ -476,7 +476,7 @@ std::unique_ptr ClangMoveAction::CreateASTConsumer(CompilerInstance &Compiler, StringRef /*InFile*/) { - Compiler.getPreprocessor().addPPCallbacks(llvm::make_unique( + Compiler.getPreprocessor().addPPCallbacks(std::make_unique( &Compiler.getSourceManager(), &MoveTool)); return MatchFinder.newASTConsumer(); } @@ -610,7 +610,7 @@ // Matchers for old files, including old.h/old.cc //============================================================================ // Create a MatchCallback for class declarations. - MatchCallbacks.push_back(llvm::make_unique(this)); + MatchCallbacks.push_back(std::make_unique(this)); // Match moved class declarations. auto MovedClass = cxxRecordDecl(InOldFiles, *HasAnySymbolNames, isDefinition(), TopLevelDecl) @@ -629,19 +629,19 @@ .bind("class_static_var_decl"), MatchCallbacks.back().get()); - MatchCallbacks.push_back(llvm::make_unique(this)); + MatchCallbacks.push_back(std::make_unique(this)); Finder->addMatcher(functionDecl(InOldFiles, *HasAnySymbolNames, TopLevelDecl) .bind("function"), MatchCallbacks.back().get()); - MatchCallbacks.push_back(llvm::make_unique(this)); + MatchCallbacks.push_back(std::make_unique(this)); Finder->addMatcher( varDecl(InOldFiles, *HasAnySymbolNames, TopLevelDecl).bind("var"), MatchCallbacks.back().get()); // Match enum definition in old.h. Enum helpers (which are defined in old.cc) // will not be moved for now no matter whether they are used or not. - MatchCallbacks.push_back(llvm::make_unique(this)); + MatchCallbacks.push_back(std::make_unique(this)); Finder->addMatcher( enumDecl(InOldHeader, *HasAnySymbolNames, isDefinition(), TopLevelDecl) .bind("enum"), @@ -650,7 +650,7 @@ // Match type alias in old.h, this includes "typedef" and "using" type alias // declarations. Type alias helpers (which are defined in old.cc) will not be // moved for now no matter whether they are used or not. - MatchCallbacks.push_back(llvm::make_unique(this)); + MatchCallbacks.push_back(std::make_unique(this)); Finder->addMatcher(namedDecl(anyOf(typedefDecl().bind("typedef"), typeAliasDecl().bind("type_alias")), InOldHeader, *HasAnySymbolNames, TopLevelDecl), Index: clang-tools-extra/clang-reorder-fields/ReorderFieldsAction.cpp =================================================================== --- clang-tools-extra/clang-reorder-fields/ReorderFieldsAction.cpp +++ clang-tools-extra/clang-reorder-fields/ReorderFieldsAction.cpp @@ -302,7 +302,7 @@ } // end anonymous namespace std::unique_ptr ReorderFieldsAction::newASTConsumer() { - return llvm::make_unique(RecordName, DesiredFieldsOrder, + return std::make_unique(RecordName, DesiredFieldsOrder, Replacements); } Index: clang-tools-extra/clang-tidy/ClangTidy.cpp =================================================================== --- clang-tools-extra/clang-tidy/ClangTidy.cpp +++ clang-tools-extra/clang-tidy/ClangTidy.cpp @@ -390,7 +390,7 @@ std::unique_ptr Profiling; if (Context.getEnableProfiling()) { - Profiling = llvm::make_unique( + Profiling = std::make_unique( Context.getProfileStorageParams()); FinderOptions.CheckProfiling.emplace(Profiling->Records); } @@ -402,7 +402,7 @@ Preprocessor *ModuleExpanderPP = PP; if (Context.getLangOpts().Modules && OverlayFS != nullptr) { - auto ModuleExpander = llvm::make_unique( + auto ModuleExpander = std::make_unique( &Compiler, OverlayFS); ModuleExpanderPP = ModuleExpander->getPreprocessor(); PP->addPPCallbacks(std::move(ModuleExpander)); @@ -434,7 +434,7 @@ Consumers.push_back(std::move(AnalysisConsumer)); } #endif // CLANG_ENABLE_STATIC_ANALYZER - return llvm::make_unique( + return std::make_unique( std::move(Consumers), std::move(Profiling), std::move(Finder), std::move(Checks)); } @@ -469,7 +469,7 @@ getCheckNames(const ClangTidyOptions &Options, bool AllowEnablingAnalyzerAlphaCheckers) { clang::tidy::ClangTidyContext Context( - llvm::make_unique(ClangTidyGlobalOptions(), + std::make_unique(ClangTidyGlobalOptions(), Options), AllowEnablingAnalyzerAlphaCheckers); ClangTidyASTConsumerFactory Factory(Context); @@ -480,7 +480,7 @@ getCheckOptions(const ClangTidyOptions &Options, bool AllowEnablingAnalyzerAlphaCheckers) { clang::tidy::ClangTidyContext Context( - llvm::make_unique(ClangTidyGlobalOptions(), + std::make_unique(ClangTidyGlobalOptions(), Options), AllowEnablingAnalyzerAlphaCheckers); ClangTidyASTConsumerFactory Factory(Context); Index: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp =================================================================== --- clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp +++ clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp @@ -213,9 +213,9 @@ void ClangTidyContext::setCurrentFile(StringRef File) { CurrentFile = File; CurrentOptions = getOptionsForFile(CurrentFile); - CheckFilter = llvm::make_unique(*getOptions().Checks); + CheckFilter = std::make_unique(*getOptions().Checks); WarningAsErrorFilter = - llvm::make_unique(*getOptions().WarningsAsErrors); + std::make_unique(*getOptions().WarningsAsErrors); } void ClangTidyContext::setASTContext(ASTContext *Context) { @@ -604,7 +604,7 @@ llvm::Regex *ClangTidyDiagnosticConsumer::getHeaderFilter() { if (!HeaderFilter) HeaderFilter = - llvm::make_unique(*Context.getOptions().HeaderFilterRegex); + std::make_unique(*Context.getOptions().HeaderFilterRegex); return HeaderFilter.get(); } Index: clang-tools-extra/clang-tidy/ClangTidyOptions.h =================================================================== --- clang-tools-extra/clang-tidy/ClangTidyOptions.h +++ clang-tools-extra/clang-tidy/ClangTidyOptions.h @@ -199,7 +199,7 @@ /// FileOptionsProvider::ConfigFileHandlers ConfigHandlers; /// ConfigHandlers.emplace_back(".my-tidy-config", parseMyConfigFormat); /// ConfigHandlers.emplace_back(".clang-tidy", parseConfiguration); - /// return llvm::make_unique( + /// return std::make_unique( /// GlobalOptions, DefaultOptions, OverrideOptions, ConfigHandlers); /// \endcode /// Index: clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.cpp =================================================================== --- clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.cpp +++ clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.cpp @@ -54,7 +54,7 @@ ExpandModularHeadersPPCallbacks::ExpandModularHeadersPPCallbacks( CompilerInstance *CI, IntrusiveRefCntPtr OverlayFS) - : Recorder(llvm::make_unique()), Compiler(*CI), + : Recorder(std::make_unique()), Compiler(*CI), InMemoryFs(new llvm::vfs::InMemoryFileSystem), Sources(Compiler.getSourceManager()), // Forward the new diagnostics to the original DiagnosticConsumer. @@ -72,13 +72,13 @@ auto HSO = std::make_shared(); *HSO = Compiler.getHeaderSearchOpts(); - HeaderInfo = llvm::make_unique(HSO, Sources, Diags, LangOpts, + HeaderInfo = std::make_unique(HSO, Sources, Diags, LangOpts, &Compiler.getTarget()); auto PO = std::make_shared(); *PO = Compiler.getPreprocessorOpts(); - PP = llvm::make_unique(PO, Diags, LangOpts, Sources, + PP = std::make_unique(PO, Diags, LangOpts, Sources, *HeaderInfo, ModuleLoader, /*IILookup=*/nullptr, /*OwnsHeaderSearch=*/false); Index: clang-tools-extra/clang-tidy/abseil/StringFindStartswithCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/abseil/StringFindStartswithCheck.cpp +++ clang-tools-extra/clang-tidy/abseil/StringFindStartswithCheck.cpp @@ -115,7 +115,7 @@ void StringFindStartswithCheck::registerPPCallbacks( const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) { - IncludeInserter = llvm::make_unique(SM, getLangOpts(), + IncludeInserter = std::make_unique(SM, getLangOpts(), IncludeStyle); PP->addPPCallbacks(IncludeInserter->CreatePPCallbacks()); } Index: clang-tools-extra/clang-tidy/bugprone/LambdaFunctionNameCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/bugprone/LambdaFunctionNameCheck.cpp +++ clang-tools-extra/clang-tidy/bugprone/LambdaFunctionNameCheck.cpp @@ -66,7 +66,7 @@ void LambdaFunctionNameCheck::registerPPCallbacks( const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) { - PP->addPPCallbacks(llvm::make_unique( + PP->addPPCallbacks(std::make_unique( &SuppressMacroExpansions)); } Index: clang-tools-extra/clang-tidy/bugprone/MacroParenthesesCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/bugprone/MacroParenthesesCheck.cpp +++ clang-tools-extra/clang-tidy/bugprone/MacroParenthesesCheck.cpp @@ -250,7 +250,7 @@ void MacroParenthesesCheck::registerPPCallbacks( const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) { - PP->addPPCallbacks(llvm::make_unique(PP, this)); + PP->addPPCallbacks(std::make_unique(PP, this)); } } // namespace bugprone Index: clang-tools-extra/clang-tidy/bugprone/MacroRepeatedSideEffectsCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/bugprone/MacroRepeatedSideEffectsCheck.cpp +++ clang-tools-extra/clang-tidy/bugprone/MacroRepeatedSideEffectsCheck.cpp @@ -173,7 +173,7 @@ void MacroRepeatedSideEffectsCheck::registerPPCallbacks( const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) { - PP->addPPCallbacks(::llvm::make_unique(*this, *PP)); + PP->addPPCallbacks(::std::make_unique(*this, *PP)); } } // namespace bugprone Index: clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp +++ clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp @@ -102,8 +102,8 @@ return false; Sequence = - llvm::make_unique(TheCFG.get(), FunctionBody, Context); - BlockMap = llvm::make_unique(TheCFG.get(), Context); + std::make_unique(TheCFG.get(), FunctionBody, Context); + BlockMap = std::make_unique(TheCFG.get(), Context); Visited.clear(); const CFGBlock *Block = BlockMap->blockContainingStmt(MovingCall); Index: clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.cpp +++ clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.cpp @@ -51,7 +51,7 @@ // Per [headers]p5, setjmp must be exposed as a macro instead of a function, // despite the allowance in C for setjmp to also be an extern function. - PP->addPPCallbacks(llvm::make_unique(*this)); + PP->addPPCallbacks(std::make_unique(*this)); } void SetLongJmpCheck::registerMatchers(MatchFinder *Finder) { Index: clang-tools-extra/clang-tidy/cppcoreguidelines/MacroUsageCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/cppcoreguidelines/MacroUsageCheck.cpp +++ clang-tools-extra/clang-tidy/cppcoreguidelines/MacroUsageCheck.cpp @@ -74,7 +74,7 @@ if (!getLangOpts().CPlusPlus11) return; - PP->addPPCallbacks(llvm::make_unique( + PP->addPPCallbacks(std::make_unique( this, SM, AllowedRegexp, CheckCapsOnly, IgnoreCommandLineMacros)); } Index: clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp +++ clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp @@ -35,7 +35,7 @@ if (!getLangOpts().CPlusPlus) return; - Inserter = llvm::make_unique(SM, getLangOpts(), + Inserter = std::make_unique(SM, getLangOpts(), IncludeStyle); PP->addPPCallbacks(Inserter->CreatePPCallbacks()); } Index: clang-tools-extra/clang-tidy/fuchsia/RestrictSystemIncludesCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/fuchsia/RestrictSystemIncludesCheck.cpp +++ clang-tools-extra/clang-tidy/fuchsia/RestrictSystemIncludesCheck.cpp @@ -103,7 +103,7 @@ void RestrictSystemIncludesCheck::registerPPCallbacks( const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) { PP->addPPCallbacks( - llvm::make_unique(*this, SM)); + std::make_unique(*this, SM)); } void RestrictSystemIncludesCheck::storeOptions( Index: clang-tools-extra/clang-tidy/google/AvoidUnderscoreInGoogletestNameCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/google/AvoidUnderscoreInGoogletestNameCheck.cpp +++ clang-tools-extra/clang-tidy/google/AvoidUnderscoreInGoogletestNameCheck.cpp @@ -79,7 +79,7 @@ void AvoidUnderscoreInGoogletestNameCheck::registerPPCallbacks( const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) { PP->addPPCallbacks( - llvm::make_unique(PP, this)); + std::make_unique(PP, this)); } } // namespace readability Index: clang-tools-extra/clang-tidy/google/IntegerTypesCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/google/IntegerTypesCheck.cpp +++ clang-tools-extra/clang-tidy/google/IntegerTypesCheck.cpp @@ -68,7 +68,7 @@ callee(functionDecl(hasAttr(attr::Format))))))) .bind("tl"), this); - IdentTable = llvm::make_unique(getLangOpts()); + IdentTable = std::make_unique(getLangOpts()); } void IntegerTypesCheck::check(const MatchFinder::MatchResult &Result) { Index: clang-tools-extra/clang-tidy/google/TodoCommentCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/google/TodoCommentCheck.cpp +++ clang-tools-extra/clang-tidy/google/TodoCommentCheck.cpp @@ -52,7 +52,7 @@ TodoCommentCheck::TodoCommentCheck(StringRef Name, ClangTidyContext *Context) : ClangTidyCheck(Name, Context), - Handler(llvm::make_unique( + Handler(std::make_unique( *this, Context->getOptions().User)) {} void TodoCommentCheck::registerPPCallbacks(const SourceManager &SM, Index: clang-tools-extra/clang-tidy/google/UpgradeGoogletestCaseCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/google/UpgradeGoogletestCaseCheck.cpp +++ clang-tools-extra/clang-tidy/google/UpgradeGoogletestCaseCheck.cpp @@ -125,7 +125,7 @@ return; PP->addPPCallbacks( - llvm::make_unique(this, PP)); + std::make_unique(this, PP)); } void UpgradeGoogletestCaseCheck::registerMatchers(MatchFinder *Finder) { Index: clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp +++ clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp @@ -53,7 +53,7 @@ void IncludeOrderCheck::registerPPCallbacks(const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) { - PP->addPPCallbacks(::llvm::make_unique(*this, SM)); + PP->addPPCallbacks(::std::make_unique(*this, SM)); } static int getPriority(StringRef Filename, bool IsAngled, bool IsMainModule) { Index: clang-tools-extra/clang-tidy/misc/UnusedParametersCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/misc/UnusedParametersCheck.cpp +++ clang-tools-extra/clang-tidy/misc/UnusedParametersCheck.cpp @@ -135,7 +135,7 @@ auto MyDiag = diag(Param->getLocation(), "parameter %0 is unused") << Param; if (!Indexer) { - Indexer = llvm::make_unique(*Result.Context); + Indexer = std::make_unique(*Result.Context); } // Cannot remove parameter for non-local functions. Index: clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.cpp +++ clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.cpp @@ -44,7 +44,7 @@ const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) { if (getLangOpts().CPlusPlus) { PP->addPPCallbacks( - ::llvm::make_unique(*this, getLangOpts())); + ::std::make_unique(*this, getLangOpts())); } } Index: clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp +++ clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp @@ -69,7 +69,7 @@ Preprocessor *PP, Preprocessor *ModuleExpanderPP) { if (isLanguageVersionSupported(getLangOpts())) { - Inserter = llvm::make_unique(SM, getLangOpts(), + Inserter = std::make_unique(SM, getLangOpts(), IncludeStyle); PP->addPPCallbacks(Inserter->CreatePPCallbacks()); } @@ -128,7 +128,7 @@ // Be conservative for cases where we construct an array without any // initalization. // For example, - // P.reset(new int[5]) // check fix: P = make_unique(5) + // P.reset(new int[5]) // check fix: P = std::make_unique(5) // // The fix of the check has side effect, it introduces default initialization // which maybe unexpected and cause performance regression. Index: clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp +++ clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp @@ -171,7 +171,7 @@ // currently does not provide any benefit to other languages, despite being // benign. if (getLangOpts().CPlusPlus) { - Inserter = llvm::make_unique(SM, getLangOpts(), + Inserter = std::make_unique(SM, getLangOpts(), IncludeStyle); PP->addPPCallbacks(Inserter->CreatePPCallbacks()); } Index: clang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.cpp +++ clang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.cpp @@ -140,7 +140,7 @@ // benign. if (!getLangOpts().CPlusPlus) return; - Inserter = llvm::make_unique(SM, getLangOpts(), + Inserter = std::make_unique(SM, getLangOpts(), IncludeStyle); PP->addPPCallbacks(Inserter->CreatePPCallbacks()); } Index: clang-tools-extra/clang-tidy/modernize/ReplaceRandomShuffleCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/modernize/ReplaceRandomShuffleCheck.cpp +++ clang-tools-extra/clang-tidy/modernize/ReplaceRandomShuffleCheck.cpp @@ -44,7 +44,7 @@ void ReplaceRandomShuffleCheck::registerPPCallbacks( const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) { - IncludeInserter = llvm::make_unique(SM, getLangOpts(), + IncludeInserter = std::make_unique(SM, getLangOpts(), IncludeStyle); PP->addPPCallbacks(IncludeInserter->CreatePPCallbacks()); } Index: clang-tools-extra/clang-tidy/performance/MoveConstructorInitCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/performance/MoveConstructorInitCheck.cpp +++ clang-tools-extra/clang-tidy/performance/MoveConstructorInitCheck.cpp @@ -93,7 +93,7 @@ void MoveConstructorInitCheck::registerPPCallbacks( const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) { - Inserter = llvm::make_unique(SM, getLangOpts(), + Inserter = std::make_unique(SM, getLangOpts(), IncludeStyle); PP->addPPCallbacks(Inserter->CreatePPCallbacks()); } Index: clang-tools-extra/clang-tidy/performance/TypePromotionInMathFnCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/performance/TypePromotionInMathFnCheck.cpp +++ clang-tools-extra/clang-tidy/performance/TypePromotionInMathFnCheck.cpp @@ -36,7 +36,7 @@ void TypePromotionInMathFnCheck::registerPPCallbacks( const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) { - IncludeInserter = llvm::make_unique(SM, getLangOpts(), + IncludeInserter = std::make_unique(SM, getLangOpts(), IncludeStyle); PP->addPPCallbacks(IncludeInserter->CreatePPCallbacks()); } Index: clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp +++ clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp @@ -169,7 +169,7 @@ void UnnecessaryValueParamCheck::registerPPCallbacks( const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) { - Inserter = llvm::make_unique(SM, getLangOpts(), + Inserter = std::make_unique(SM, getLangOpts(), IncludeStyle); PP->addPPCallbacks(Inserter->CreatePPCallbacks()); } Index: clang-tools-extra/clang-tidy/plugin/ClangTidyPlugin.cpp =================================================================== --- clang-tools-extra/clang-tidy/plugin/ClangTidyPlugin.cpp +++ clang-tools-extra/clang-tidy/plugin/ClangTidyPlugin.cpp @@ -42,7 +42,7 @@ auto ExternalDiagEngine = &Compiler.getDiagnostics(); auto DiagConsumer = new ClangTidyDiagnosticConsumer(*Context, ExternalDiagEngine); - auto DiagEngine = llvm::make_unique( + auto DiagEngine = std::make_unique( new DiagnosticIDs, new DiagnosticOptions, DiagConsumer); Context->setDiagnosticsEngine(DiagEngine.get()); @@ -51,7 +51,7 @@ std::vector> Vec; Vec.push_back(Factory.CreateASTConsumer(Compiler, File)); - return llvm::make_unique( + return std::make_unique( std::move(Context), std::move(DiagEngine), std::move(Vec)); } @@ -67,9 +67,9 @@ if (Arg.startswith("-checks=")) OverrideOptions.Checks = Arg.substr(strlen("-checks=")); - auto Options = llvm::make_unique( + auto Options = std::make_unique( GlobalOptions, DefaultOptions, OverrideOptions); - Context = llvm::make_unique(std::move(Options)); + Context = std::make_unique(std::move(Options)); return true; } Index: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp +++ clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp @@ -243,7 +243,7 @@ void IdentifierNamingCheck::registerPPCallbacks( const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) { ModuleExpanderPP->addPPCallbacks( - llvm::make_unique(ModuleExpanderPP, + std::make_unique(ModuleExpanderPP, this)); } Index: clang-tools-extra/clang-tidy/readability/RedundantPreprocessorCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/readability/RedundantPreprocessorCheck.cpp +++ clang-tools-extra/clang-tidy/readability/RedundantPreprocessorCheck.cpp @@ -99,7 +99,7 @@ void RedundantPreprocessorCheck::registerPPCallbacks( const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) { PP->addPPCallbacks( - ::llvm::make_unique(*this, *PP)); + ::std::make_unique(*this, *PP)); } } // namespace readability Index: clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp =================================================================== --- clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp +++ clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp @@ -289,7 +289,7 @@ if (!Config.empty()) { if (llvm::ErrorOr ParsedConfig = parseConfiguration(Config)) { - return llvm::make_unique( + return std::make_unique( GlobalOptions, ClangTidyOptions::getDefaults().mergeWith(DefaultOptions), *ParsedConfig, OverrideOptions); @@ -299,7 +299,7 @@ return nullptr; } } - return llvm::make_unique(GlobalOptions, DefaultOptions, + return std::make_unique(GlobalOptions, DefaultOptions, OverrideOptions, std::move(FS)); } Index: clang-tools-extra/clang-tidy/utils/HeaderGuard.cpp =================================================================== --- clang-tools-extra/clang-tidy/utils/HeaderGuard.cpp +++ clang-tools-extra/clang-tidy/utils/HeaderGuard.cpp @@ -269,7 +269,7 @@ void HeaderGuardCheck::registerPPCallbacks(const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) { - PP->addPPCallbacks(llvm::make_unique(PP, this)); + PP->addPPCallbacks(std::make_unique(PP, this)); } bool HeaderGuardCheck::shouldSuggestEndifComment(StringRef FileName) { Index: clang-tools-extra/clang-tidy/utils/IncludeInserter.h =================================================================== --- clang-tools-extra/clang-tidy/utils/IncludeInserter.h +++ clang-tools-extra/clang-tidy/utils/IncludeInserter.h @@ -33,7 +33,7 @@ /// public: /// void registerPPCallbacks(const SourceManager &SM, Preprocessor *PP, /// Preprocessor *ModuleExpanderPP) override { -/// Inserter = llvm::make_unique( +/// Inserter = std::make_unique( /// SM, getLangOpts(), utils::IncludeSorter::IS_Google); /// PP->addPPCallbacks(Inserter->CreatePPCallbacks()); /// } Index: clang-tools-extra/clang-tidy/utils/IncludeInserter.cpp =================================================================== --- clang-tools-extra/clang-tidy/utils/IncludeInserter.cpp +++ clang-tools-extra/clang-tidy/utils/IncludeInserter.cpp @@ -42,7 +42,7 @@ IncludeInserter::~IncludeInserter() {} std::unique_ptr IncludeInserter::CreatePPCallbacks() { - return llvm::make_unique(this); + return std::make_unique(this); } llvm::Optional @@ -58,7 +58,7 @@ // file. IncludeSorterByFile.insert(std::make_pair( FileID, - llvm::make_unique( + std::make_unique( &SourceMgr, &LangOpts, FileID, SourceMgr.getFilename(SourceMgr.getLocForStartOfFile(FileID)), Style))); @@ -72,7 +72,7 @@ FileID FileID = SourceMgr.getFileID(HashLocation); if (IncludeSorterByFile.find(FileID) == IncludeSorterByFile.end()) { IncludeSorterByFile.insert(std::make_pair( - FileID, llvm::make_unique( + FileID, std::make_unique( &SourceMgr, &LangOpts, FileID, SourceMgr.getFilename(HashLocation), Style))); } Index: clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.cpp =================================================================== --- clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.cpp +++ clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.cpp @@ -53,7 +53,7 @@ if (Rule && llvm::any_of(Rule->Cases, [](const RewriteRule::Case &C) { return !C.AddedIncludes.empty(); })) { - Inserter = llvm::make_unique( + Inserter = std::make_unique( SM, getLangOpts(), utils::IncludeSorter::IS_LLVM); PP->addPPCallbacks(Inserter->CreatePPCallbacks()); } Index: clang-tools-extra/clangd/ClangdLSPServer.cpp =================================================================== --- clang-tools-extra/clangd/ClangdLSPServer.cpp +++ clang-tools-extra/clangd/ClangdLSPServer.cpp @@ -426,7 +426,7 @@ if (const auto &Dir = Params.initializationOptions.compilationDatabasePath) CompileCommandsDir = Dir; if (UseDirBasedCDB) { - BaseCDB = llvm::make_unique( + BaseCDB = std::make_unique( CompileCommandsDir); BaseCDB = getQueryDriverDatabase( llvm::makeArrayRef(ClangdServerOpts.QueryDriverGlobs), Index: clang-tools-extra/clangd/ClangdServer.cpp =================================================================== --- clang-tools-extra/clangd/ClangdServer.cpp +++ clang-tools-extra/clangd/ClangdServer.cpp @@ -127,13 +127,13 @@ // critical paths. WorkScheduler( CDB, Opts.AsyncThreadsCount, Opts.StorePreamblesInMemory, - llvm::make_unique( + std::make_unique( DynamicIdx.get(), DiagConsumer, Opts.SemanticHighlighting), Opts.UpdateDebounce, Opts.RetentionPolicy) { // Adds an index to the stack, at higher priority than existing indexes. auto AddIndex = [&](SymbolIndex *Idx) { if (this->Index != nullptr) { - MergedIdx.push_back(llvm::make_unique(Idx, this->Index)); + MergedIdx.push_back(std::make_unique(Idx, this->Index)); this->Index = MergedIdx.back().get(); } else { this->Index = Idx; @@ -142,7 +142,7 @@ if (Opts.StaticIndex) AddIndex(Opts.StaticIndex); if (Opts.BackgroundIndex) { - BackgroundIdx = llvm::make_unique( + BackgroundIdx = std::make_unique( Context::current().clone(), FSProvider, CDB, BackgroundIndexStorage::createDiskBackedStorageFactory( [&CDB](llvm::StringRef File) { return CDB.getProjectInfo(File); }), Index: clang-tools-extra/clangd/ClangdUnit.cpp =================================================================== --- clang-tools-extra/clangd/ClangdUnit.cpp +++ clang-tools-extra/clangd/ClangdUnit.cpp @@ -96,7 +96,7 @@ protected: std::unique_ptr CreateASTConsumer(CompilerInstance &CI, llvm::StringRef InFile) override { - return llvm::make_unique(/*ref*/ TopLevelDecls); + return std::make_unique(/*ref*/ TopLevelDecls); } private: @@ -160,9 +160,9 @@ std::unique_ptr createPPCallbacks() override { assert(SourceMgr && "SourceMgr must be set at this point"); - return llvm::make_unique( + return std::make_unique( collectIncludeStructureCallback(*SourceMgr, &Includes), - llvm::make_unique(*SourceMgr, &MainFileMacros)); + std::make_unique(*SourceMgr, &MainFileMacros)); } CommentHandler *getCommentHandler() override { @@ -311,7 +311,7 @@ if (!Clang) return None; - auto Action = llvm::make_unique(); + auto Action = std::make_unique(); const FrontendInputFile &MainInput = Clang->getFrontendOpts().Inputs[0]; if (!Action->BeginSourceFile(*Clang, MainInput)) { log("BeginSourceFile() failed when building AST for {0}", @@ -335,7 +335,7 @@ tidy::ClangTidyCheckFactories CTFactories; for (const auto &E : tidy::ClangTidyModuleRegistry::entries()) E.instantiate()->addCheckFactories(CTFactories); - CTContext.emplace(llvm::make_unique( + CTContext.emplace(std::make_unique( tidy::ClangTidyGlobalOptions(), Opts.ClangTidyOpts)); CTContext->setDiagnosticsEngine(&Clang->getDiagnostics()); CTContext->setASTContext(&Clang->getASTContext()); @@ -616,7 +616,7 @@ llvm::SmallString<32> AbsFileName(FileName); Inputs.FS->makeAbsolute(AbsFileName); - auto StatCache = llvm::make_unique(AbsFileName); + auto StatCache = std::make_unique(AbsFileName); auto BuiltPreamble = PrecompiledPreamble::Build( CI, ContentsBuffer.get(), Bounds, *PreambleDiagsEngine, StatCache->getProducingFS(Inputs.FS), @@ -659,7 +659,7 @@ } return ParsedAST::build( - llvm::make_unique(*Invocation), Preamble, + std::make_unique(*Invocation), Preamble, llvm::MemoryBuffer::getMemBufferCopy(Inputs.Contents, FileName), std::move(VFS), Inputs.Index, Inputs.Opts); } Index: clang-tools-extra/clangd/CodeComplete.cpp =================================================================== --- clang-tools-extra/clangd/CodeComplete.cpp +++ clang-tools-extra/clangd/CodeComplete.cpp @@ -1252,7 +1252,7 @@ // - completion results based on the AST. // - partial identifier and context. We need these for the index query. CodeCompleteResult Output; - auto RecorderOwner = llvm::make_unique(Opts, [&]() { + auto RecorderOwner = std::make_unique(Opts, [&]() { assert(Recorder && "Recorder is not set"); CCContextKind = Recorder->CCContext.getKind(); auto Style = getFormatStyleForFile( @@ -1756,7 +1756,7 @@ Options.IncludeBriefComments = false; IncludeStructure PreambleInclusions; // Unused for signatureHelp semaCodeComplete( - llvm::make_unique(Options, Index, Result), + std::make_unique(Options, Index, Result), Options, {FileName, Command, Preamble, Contents, *Offset, std::move(VFS)}); return Result; Index: clang-tools-extra/clangd/Compiler.cpp =================================================================== --- clang-tools-extra/clangd/Compiler.cpp +++ clang-tools-extra/clangd/Compiler.cpp @@ -88,7 +88,7 @@ CI->getFrontendOpts().Inputs[0].getFile(), Buffer.get()); } - auto Clang = llvm::make_unique( + auto Clang = std::make_unique( std::make_shared()); Clang->setInvocation(std::move(CI)); Clang->createDiagnostics(&DiagsClient, false); Index: clang-tools-extra/clangd/Context.h =================================================================== --- clang-tools-extra/clangd/Context.h +++ clang-tools-extra/clangd/Context.h @@ -122,7 +122,7 @@ typename std::decay::type Value) const & { return Context(std::make_shared(Data{ /*Parent=*/DataPtr, &Key, - llvm::make_unique::type>>( + std::make_unique::type>>( std::move(Value))})); } @@ -132,7 +132,7 @@ typename std::decay::type Value) && /* takes ownership */ { return Context(std::make_shared(Data{ /*Parent=*/std::move(DataPtr), &Key, - llvm::make_unique::type>>( + std::make_unique::type>>( std::move(Value))})); } Index: clang-tools-extra/clangd/Headers.cpp =================================================================== --- clang-tools-extra/clangd/Headers.cpp +++ clang-tools-extra/clangd/Headers.cpp @@ -112,7 +112,7 @@ std::unique_ptr collectIncludeStructureCallback(const SourceManager &SM, IncludeStructure *Out) { - return llvm::make_unique(SM, Out); + return std::make_unique(SM, Out); } void IncludeStructure::recordInclude(llvm::StringRef IncludingName, Index: clang-tools-extra/clangd/JSONTransport.cpp =================================================================== --- clang-tools-extra/clangd/JSONTransport.cpp +++ clang-tools-extra/clangd/JSONTransport.cpp @@ -294,7 +294,7 @@ llvm::raw_ostream *InMirror, bool Pretty, JSONStreamStyle Style) { - return llvm::make_unique(In, Out, InMirror, Pretty, Style); + return std::make_unique(In, Out, InMirror, Pretty, Style); } } // namespace clangd Index: clang-tools-extra/clangd/QueryDriverDatabase.cpp =================================================================== --- clang-tools-extra/clangd/QueryDriverDatabase.cpp +++ clang-tools-extra/clangd/QueryDriverDatabase.cpp @@ -277,7 +277,7 @@ assert(Base && "Null base to SystemIncludeExtractor"); if (QueryDriverGlobs.empty()) return Base; - return llvm::make_unique(QueryDriverGlobs, + return std::make_unique(QueryDriverGlobs, std::move(Base)); } Index: clang-tools-extra/clangd/TUScheduler.cpp =================================================================== --- clang-tools-extra/clangd/TUScheduler.cpp +++ clang-tools-extra/clangd/TUScheduler.cpp @@ -469,7 +469,7 @@ if (!AST) { llvm::Optional NewAST = buildAST(FileName, std::move(Invocation), Inputs, NewPreamble); - AST = NewAST ? llvm::make_unique(std::move(*NewAST)) : nullptr; + AST = NewAST ? std::make_unique(std::move(*NewAST)) : nullptr; if (!(*AST)) { // buildAST fails. TUStatus::BuildDetails Details; Details.BuildFailed = true; @@ -519,10 +519,10 @@ llvm::Optional NewAST = Invocation ? buildAST(FileName, - llvm::make_unique(*Invocation), + std::make_unique(*Invocation), *CurrentInputs, getPossiblyStalePreamble()) : None; - AST = NewAST ? llvm::make_unique(std::move(*NewAST)) : nullptr; + AST = NewAST ? std::make_unique(std::move(*NewAST)) : nullptr; } // Make sure we put the AST back into the LRU cache. auto _ = llvm::make_scope_exit( @@ -832,9 +832,9 @@ ASTRetentionPolicy RetentionPolicy) : CDB(CDB), StorePreamblesInMemory(StorePreamblesInMemory), Callbacks(Callbacks ? move(Callbacks) - : llvm::make_unique()), + : std::make_unique()), Barrier(AsyncThreadsCount), - IdleASTs(llvm::make_unique(RetentionPolicy.MaxRetainedASTs)), + IdleASTs(std::make_unique(RetentionPolicy.MaxRetainedASTs)), UpdateDebounce(UpdateDebounce) { if (0 < AsyncThreadsCount) { PreambleTasks.emplace(); Index: clang-tools-extra/clangd/Trace.cpp =================================================================== --- clang-tools-extra/clangd/Trace.cpp +++ clang-tools-extra/clangd/Trace.cpp @@ -52,7 +52,7 @@ // and this also allows us to look up the parent Span's information. Context beginSpan(llvm::StringRef Name, llvm::json::Object *Args) override { return Context::current().derive( - SpanKey, llvm::make_unique(this, Name, Args)); + SpanKey, std::make_unique(this, Name, Args)); } // Trace viewer requires each thread to properly stack events. @@ -200,7 +200,7 @@ std::unique_ptr createJSONTracer(llvm::raw_ostream &OS, bool Pretty) { - return llvm::make_unique(OS, Pretty); + return std::make_unique(OS, Pretty); } void log(const llvm::Twine &Message) { Index: clang-tools-extra/clangd/URI.cpp =================================================================== --- clang-tools-extra/clangd/URI.cpp +++ clang-tools-extra/clangd/URI.cpp @@ -61,7 +61,7 @@ llvm::Expected> findSchemeByName(llvm::StringRef Scheme) { if (Scheme == "file") - return llvm::make_unique(); + return std::make_unique(); for (auto I = URISchemeRegistry::begin(), E = URISchemeRegistry::end(); I != E; ++I) { Index: clang-tools-extra/clangd/index/Background.cpp =================================================================== --- clang-tools-extra/clangd/index/Background.cpp +++ clang-tools-extra/clangd/index/Background.cpp @@ -144,7 +144,7 @@ Context BackgroundContext, const FileSystemProvider &FSProvider, const GlobalCompilationDatabase &CDB, BackgroundIndexStorage::Factory IndexStorageFactory, size_t ThreadPoolSize) - : SwapIndex(llvm::make_unique()), FSProvider(FSProvider), + : SwapIndex(std::make_unique()), FSProvider(FSProvider), CDB(CDB), BackgroundContext(std::move(BackgroundContext)), Rebuilder(this, &IndexedSymbols, ThreadPoolSize), IndexStorageFactory(std::move(IndexStorageFactory)), @@ -300,10 +300,10 @@ Refs.insert(RefToIDs[R], *R); for (const auto *Rel : FileIt.second.Relations) Relations.insert(*Rel); - auto SS = llvm::make_unique(std::move(Syms).build()); - auto RS = llvm::make_unique(std::move(Refs).build()); - auto RelS = llvm::make_unique(std::move(Relations).build()); - auto IG = llvm::make_unique( + auto SS = std::make_unique(std::move(Syms).build()); + auto RS = std::make_unique(std::move(Refs).build()); + auto RelS = std::make_unique(std::move(Relations).build()); + auto IG = std::make_unique( getSubGraph(URI::create(Path), Index.Sources.getValue())); // We need to store shards before updating the index, since the latter @@ -466,14 +466,14 @@ continue; auto SS = LS.Shard->Symbols - ? llvm::make_unique(std::move(*LS.Shard->Symbols)) + ? std::make_unique(std::move(*LS.Shard->Symbols)) : nullptr; auto RS = LS.Shard->Refs - ? llvm::make_unique(std::move(*LS.Shard->Refs)) + ? std::make_unique(std::move(*LS.Shard->Refs)) : nullptr; auto RelS = LS.Shard->Relations - ? llvm::make_unique(std::move(*LS.Shard->Relations)) + ? std::make_unique(std::move(*LS.Shard->Relations)) : nullptr; ShardVersion &SV = ShardVersions[LS.AbsolutePath]; SV.Digest = LS.Digest; Index: clang-tools-extra/clangd/index/BackgroundIndexStorage.cpp =================================================================== --- clang-tools-extra/clangd/index/BackgroundIndexStorage.cpp +++ clang-tools-extra/clangd/index/BackgroundIndexStorage.cpp @@ -91,7 +91,7 @@ if (!Buffer) return nullptr; if (auto I = readIndexFile(Buffer->get()->getBuffer())) - return llvm::make_unique(std::move(*I)); + return std::make_unique(std::move(*I)); else elog("Error while reading shard {0}: {1}", ShardIdentifier, I.takeError()); @@ -128,7 +128,7 @@ public: DiskBackedIndexStorageManager( std::function(PathRef)> GetProjectInfo) - : IndexStorageMapMu(llvm::make_unique()), + : IndexStorageMapMu(std::make_unique()), GetProjectInfo(std::move(GetProjectInfo)) { llvm::SmallString<128> HomeDir; llvm::sys::path::home_directory(HomeDir); @@ -151,9 +151,9 @@ std::unique_ptr create(PathRef CDBDirectory) { if (CDBDirectory.empty()) { elog("Tried to create storage for empty directory!"); - return llvm::make_unique(); + return std::make_unique(); } - return llvm::make_unique(CDBDirectory); + return std::make_unique(CDBDirectory); } Path HomeDir; Index: clang-tools-extra/clangd/index/CanonicalIncludes.cpp =================================================================== --- clang-tools-extra/clangd/index/CanonicalIncludes.cpp +++ clang-tools-extra/clangd/index/CanonicalIncludes.cpp @@ -83,7 +83,7 @@ private: CanonicalIncludes *const Includes; }; - return llvm::make_unique(Includes); + return std::make_unique(Includes); } void addSystemHeadersMapping(CanonicalIncludes *Includes, Index: clang-tools-extra/clangd/index/FileIndex.cpp =================================================================== --- clang-tools-extra/clangd/index/FileIndex.cpp +++ clang-tools-extra/clangd/index/FileIndex.cpp @@ -216,14 +216,14 @@ // Index must keep the slabs and contiguous ranges alive. switch (Type) { case IndexType::Light: - return llvm::make_unique( + return std::make_unique( llvm::make_pointee_range(AllSymbols), std::move(AllRefs), std::move(AllRelations), std::make_tuple(std::move(SymbolSlabs), std::move(RefSlabs), std::move(RefsStorage), std::move(SymsStorage)), StorageSize); case IndexType::Heavy: - return llvm::make_unique( + return std::make_unique( llvm::make_pointee_range(AllSymbols), std::move(AllRefs), std::move(AllRelations), std::make_tuple(std::move(SymbolSlabs), std::move(RefSlabs), @@ -235,17 +235,17 @@ FileIndex::FileIndex(bool UseDex) : MergedIndex(&MainFileIndex, &PreambleIndex), UseDex(UseDex), - PreambleIndex(llvm::make_unique()), - MainFileIndex(llvm::make_unique()) {} + PreambleIndex(std::make_unique()), + MainFileIndex(std::make_unique()) {} void FileIndex::updatePreamble(PathRef Path, ASTContext &AST, std::shared_ptr PP, const CanonicalIncludes &Includes) { auto Slabs = indexHeaderSymbols(AST, std::move(PP), Includes); PreambleSymbols.update( - Path, llvm::make_unique(std::move(std::get<0>(Slabs))), - llvm::make_unique(), - llvm::make_unique(std::move(std::get<2>(Slabs))), + Path, std::make_unique(std::move(std::get<0>(Slabs))), + std::make_unique(), + std::make_unique(std::move(std::get<2>(Slabs))), /*CountReferences=*/false); PreambleIndex.reset( PreambleSymbols.buildIndex(UseDex ? IndexType::Heavy : IndexType::Light, @@ -255,9 +255,9 @@ void FileIndex::updateMain(PathRef Path, ParsedAST &AST) { auto Contents = indexMainDecls(AST); MainFileSymbols.update( - Path, llvm::make_unique(std::move(std::get<0>(Contents))), - llvm::make_unique(std::move(std::get<1>(Contents))), - llvm::make_unique(std::move(std::get<2>(Contents))), + Path, std::make_unique(std::move(std::get<0>(Contents))), + std::make_unique(std::move(std::get<1>(Contents))), + std::make_unique(std::move(std::get<2>(Contents))), /*CountReferences=*/true); MainFileIndex.reset( MainFileSymbols.buildIndex(IndexType::Light, DuplicateHandling::Merge)); Index: clang-tools-extra/clangd/index/IndexAction.cpp =================================================================== --- clang-tools-extra/clangd/index/IndexAction.cpp +++ clang-tools-extra/clangd/index/IndexAction.cpp @@ -136,7 +136,7 @@ addSystemHeadersMapping(Includes.get(), CI.getLangOpts()); if (IncludeGraphCallback != nullptr) CI.getPreprocessor().addPPCallbacks( - llvm::make_unique(CI.getSourceManager(), IG)); + std::make_unique(CI.getSourceManager(), IG)); return WrapperFrontendAction::CreateASTConsumer(CI, InFile); } @@ -199,9 +199,9 @@ Opts.RefFilter = RefKind::All; Opts.RefsInHeaders = true; } - auto Includes = llvm::make_unique(); + auto Includes = std::make_unique(); Opts.Includes = Includes.get(); - return llvm::make_unique( + return std::make_unique( std::make_shared(std::move(Opts)), std::move(Includes), IndexOpts, SymbolsCallback, RefsCallback, RelationsCallback, IncludeGraphCallback); Index: clang-tools-extra/clangd/index/MemIndex.cpp =================================================================== --- clang-tools-extra/clangd/index/MemIndex.cpp +++ clang-tools-extra/clangd/index/MemIndex.cpp @@ -21,7 +21,7 @@ // Store Slab size before it is moved. const auto BackingDataSize = Slab.bytes() + Refs.bytes(); auto Data = std::make_pair(std::move(Slab), std::move(Refs)); - return llvm::make_unique(Data.first, Data.second, Relations, + return std::make_unique(Data.first, Data.second, Relations, std::move(Data), BackingDataSize); } Index: clang-tools-extra/clangd/index/SymbolCollector.cpp =================================================================== --- clang-tools-extra/clangd/index/SymbolCollector.cpp +++ clang-tools-extra/clangd/index/SymbolCollector.cpp @@ -206,7 +206,7 @@ ASTCtx = &Ctx; CompletionAllocator = std::make_shared(); CompletionTUInfo = - llvm::make_unique(CompletionAllocator); + std::make_unique(CompletionAllocator); } bool SymbolCollector::shouldCollectSymbol(const NamedDecl &ND, Index: clang-tools-extra/clangd/index/dex/Dex.cpp =================================================================== --- clang-tools-extra/clangd/index/dex/Dex.cpp +++ clang-tools-extra/clangd/index/dex/Dex.cpp @@ -29,7 +29,7 @@ // There is no need to include "Rels" in Data because the relations are self- // contained, without references into a backing store. auto Data = std::make_pair(std::move(Symbols), std::move(Refs)); - return llvm::make_unique(Data.first, Data.second, Rels, std::move(Data), + return std::make_unique(Data.first, Data.second, Rels, std::move(Data), Size); } Index: clang-tools-extra/clangd/index/dex/Iterator.cpp =================================================================== --- clang-tools-extra/clangd/index/dex/Iterator.cpp +++ clang-tools-extra/clangd/index/dex/Iterator.cpp @@ -380,7 +380,7 @@ case 1: return std::move(RealChildren.front()); default: - return llvm::make_unique(std::move(RealChildren)); + return std::make_unique(std::move(RealChildren)); } } @@ -410,16 +410,16 @@ case 1: return std::move(RealChildren.front()); default: - return llvm::make_unique(std::move(RealChildren)); + return std::make_unique(std::move(RealChildren)); } } std::unique_ptr Corpus::all() const { - return llvm::make_unique(Size); + return std::make_unique(Size); } std::unique_ptr Corpus::none() const { - return llvm::make_unique(); + return std::make_unique(); } std::unique_ptr Corpus::boost(std::unique_ptr Child, @@ -428,14 +428,14 @@ return Child; if (Child->kind() == Iterator::Kind::False) return Child; - return llvm::make_unique(std::move(Child), Factor); + return std::make_unique(std::move(Child), Factor); } std::unique_ptr Corpus::limit(std::unique_ptr Child, size_t Limit) const { if (Child->kind() == Iterator::Kind::False) return Child; - return llvm::make_unique(std::move(Child), Limit); + return std::make_unique(std::move(Child), Limit); } } // namespace dex Index: clang-tools-extra/clangd/index/dex/PostingList.cpp =================================================================== --- clang-tools-extra/clangd/index/dex/PostingList.cpp +++ clang-tools-extra/clangd/index/dex/PostingList.cpp @@ -220,7 +220,7 @@ : Chunks(encodeStream(Documents)) {} std::unique_ptr PostingList::iterator(const Token *Tok) const { - return llvm::make_unique(Tok, Chunks); + return std::make_unique(Tok, Chunks); } } // namespace dex Index: clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp =================================================================== --- clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp +++ clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp @@ -257,11 +257,11 @@ const char *Description; std::function()> Implementation; } CommandInfo[] = { - {"find", "Search for symbols with fuzzyFind", llvm::make_unique}, + {"find", "Search for symbols with fuzzyFind", std::make_unique}, {"lookup", "Dump symbol details by ID or qualified name", - llvm::make_unique}, + std::make_unique}, {"refs", "Find references by ID or qualified name", - llvm::make_unique}, + std::make_unique}, }; std::unique_ptr openIndex(llvm::StringRef Index) { Index: clang-tools-extra/clangd/indexer/IndexerMain.cpp =================================================================== --- clang-tools-extra/clangd/indexer/IndexerMain.cpp +++ clang-tools-extra/clangd/indexer/IndexerMain.cpp @@ -120,7 +120,7 @@ // Collect symbols found in each translation unit, merging as we go. clang::clangd::IndexFileIn Data; auto Err = Executor->get()->execute( - llvm::make_unique(Data), + std::make_unique(Data), clang::tooling::getStripPluginsAdjuster()); if (Err) { llvm::errs() << llvm::toString(std::move(Err)) << "\n"; Index: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp =================================================================== --- clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp +++ clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp @@ -453,7 +453,7 @@ const SourceManager &SM = Inputs.AST.getSourceManager(); if (const SelectionTree::Node *N = computeExtractedExpr(Inputs.ASTSelection.commonAncestor())) - Target = llvm::make_unique(N, SM, Ctx); + Target = std::make_unique(N, SM, Ctx); return Target && Target->isExtractable(); } Index: clang-tools-extra/clangd/tool/ClangdMain.cpp =================================================================== --- clang-tools-extra/clangd/tool/ClangdMain.cpp +++ clang-tools-extra/clangd/tool/ClangdMain.cpp @@ -585,7 +585,7 @@ if (EnableIndex && !IndexFile.empty()) { // Load the index asynchronously. Meanwhile SwapIndex returns no results. SwapIndex *Placeholder; - StaticIdx.reset(Placeholder = new SwapIndex(llvm::make_unique())); + StaticIdx.reset(Placeholder = new SwapIndex(std::make_unique())); AsyncIndexLoad = runAsync([Placeholder] { if (auto Idx = loadIndex(IndexFile, /*UseDex=*/true)) Placeholder->reset(std::move(Idx)); @@ -641,7 +641,7 @@ if (EnableClangTidy) { auto OverrideClangTidyOptions = tidy::ClangTidyOptions::getDefaults(); OverrideClangTidyOptions.Checks = ClangTidyChecks; - ClangTidyOptProvider = llvm::make_unique( + ClangTidyOptProvider = std::make_unique( tidy::ClangTidyGlobalOptions(), /* Default */ tidy::ClangTidyOptions::getDefaults(), /* Override */ OverrideClangTidyOptions, FSProvider.getFileSystem()); Index: clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp =================================================================== --- clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp +++ clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp @@ -74,7 +74,7 @@ return nullptr; } CacheHits++; - return llvm::make_unique(std::move(*IndexFile)); + return std::make_unique(std::move(*IndexFile)); } mutable llvm::StringSet<> AccessedPaths; @@ -575,7 +575,7 @@ class BackgroundIndexRebuilderTest : public testing::Test { protected: BackgroundIndexRebuilderTest() - : Target(llvm::make_unique()), + : Target(std::make_unique()), Rebuilder(&Target, &Source, /*Threads=*/10) { // Prepare FileSymbols with TestSymbol in it, for checkRebuild. TestSymbol.ID = SymbolID("foo"); @@ -588,7 +588,7 @@ TestSymbol.Name = VersionStorage.back(); SymbolSlab::Builder SB; SB.insert(TestSymbol); - Source.update("", llvm::make_unique(std::move(SB).build()), + Source.update("", std::make_unique(std::move(SB).build()), nullptr, nullptr, false); // Now maybe update the index. Action(); Index: clang-tools-extra/clangd/unittests/ContextTests.cpp =================================================================== --- clang-tools-extra/clangd/unittests/ContextTests.cpp +++ clang-tools-extra/clangd/unittests/ContextTests.cpp @@ -26,7 +26,7 @@ TEST(ContextTests, MoveOps) { Key> Param; - Context Ctx = Context::empty().derive(Param, llvm::make_unique(10)); + Context Ctx = Context::empty().derive(Param, std::make_unique(10)); EXPECT_EQ(**Ctx.get(Param), 10); Context NewCtx = std::move(Ctx); Index: clang-tools-extra/clangd/unittests/FileIndexTests.cpp =================================================================== --- clang-tools-extra/clangd/unittests/FileIndexTests.cpp +++ clang-tools-extra/clangd/unittests/FileIndexTests.cpp @@ -67,7 +67,7 @@ SymbolSlab::Builder Slab; for (int i = Begin; i <= End; i++) Slab.insert(symbol(std::to_string(i))); - return llvm::make_unique(std::move(Slab).build()); + return std::make_unique(std::move(Slab).build()); } std::unique_ptr refSlab(const SymbolID &ID, const char *Path) { @@ -76,7 +76,7 @@ R.Location.FileURI = Path; R.Kind = RefKind::Reference; Slab.insert(ID, R); - return llvm::make_unique(std::move(Slab).build()); + return std::make_unique(std::move(Slab).build()); } TEST(FileSymbolsTest, UpdateAndGet) { @@ -106,7 +106,7 @@ auto OneSymboSlab = [](Symbol Sym) { SymbolSlab::Builder S; S.insert(Sym); - return llvm::make_unique(std::move(S).build()); + return std::make_unique(std::move(S).build()); }; auto X1 = symbol("x"); X1.CanonicalDeclaration.FileURI = "file:///x1"; Index: clang-tools-extra/clangd/unittests/GlobalCompilationDatabaseTests.cpp =================================================================== --- clang-tools-extra/clangd/unittests/GlobalCompilationDatabaseTests.cpp +++ clang-tools-extra/clangd/unittests/GlobalCompilationDatabaseTests.cpp @@ -82,7 +82,7 @@ }; protected: - OverlayCDBTest() : Base(llvm::make_unique()) {} + OverlayCDBTest() : Base(std::make_unique()) {} std::unique_ptr Base; }; Index: clang-tools-extra/clangd/unittests/IndexTests.cpp =================================================================== --- clang-tools-extra/clangd/unittests/IndexTests.cpp +++ clang-tools-extra/clangd/unittests/IndexTests.cpp @@ -119,11 +119,11 @@ auto Token = std::make_shared(); std::weak_ptr WeakToken = Token; - SwapIndex S(llvm::make_unique(SymbolSlab(), RefSlab(), + SwapIndex S(std::make_unique(SymbolSlab(), RefSlab(), RelationSlab(), std::move(Token), /*BackingDataSize=*/0)); EXPECT_FALSE(WeakToken.expired()); // Current MemIndex keeps it alive. - S.reset(llvm::make_unique()); // Now the MemIndex is destroyed. + S.reset(std::make_unique()); // Now the MemIndex is destroyed. EXPECT_TRUE(WeakToken.expired()); // So the token is too. } Index: clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp =================================================================== --- clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp +++ clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp @@ -258,7 +258,7 @@ llvm::IntrusiveRefCntPtr Files( new FileManager(FileSystemOptions(), InMemoryFileSystem)); - auto Factory = llvm::make_unique( + auto Factory = std::make_unique( CollectorOpts, PragmaHandler.get()); std::vector Args = {"symbol_collector", "-fsyntax-only", Index: clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp =================================================================== --- clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp +++ clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp @@ -73,7 +73,7 @@ }); } }; - return llvm::make_unique(); + return std::make_unique(); } /// Schedule an update and call \p CB with the diagnostics it produces, if Index: clang-tools-extra/clangd/unittests/TestTU.cpp =================================================================== --- clang-tools-extra/clangd/unittests/TestTU.cpp +++ clang-tools-extra/clangd/unittests/TestTU.cpp @@ -83,7 +83,7 @@ std::unique_ptr TestTU::index() const { auto AST = build(); - auto Idx = llvm::make_unique(/*UseDex=*/true); + auto Idx = std::make_unique(/*UseDex=*/true); Idx->updatePreamble(Filename, AST.getASTContext(), AST.getPreprocessorPtr(), AST.getCanonicalIncludes()); Idx->updateMain(Filename, AST); Index: clang-tools-extra/clangd/xpc/XPCTransport.cpp =================================================================== --- clang-tools-extra/clangd/xpc/XPCTransport.cpp +++ clang-tools-extra/clangd/xpc/XPCTransport.cpp @@ -209,7 +209,7 @@ namespace clangd { std::unique_ptr newXPCTransport() { - return llvm::make_unique(); + return std::make_unique(); } } // namespace clangd Index: clang-tools-extra/modularize/CoverageChecker.cpp =================================================================== --- clang-tools-extra/modularize/CoverageChecker.cpp +++ clang-tools-extra/modularize/CoverageChecker.cpp @@ -105,7 +105,7 @@ public: CoverageCheckerConsumer(CoverageChecker &Checker, Preprocessor &PP) { // PP takes ownership. - PP.addPPCallbacks(llvm::make_unique(Checker)); + PP.addPPCallbacks(std::make_unique(Checker)); } }; @@ -116,7 +116,7 @@ protected: std::unique_ptr CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override { - return llvm::make_unique(Checker, + return std::make_unique(Checker, CI.getPreprocessor()); } @@ -154,7 +154,7 @@ StringRef ModuleMapPath, std::vector &IncludePaths, ArrayRef CommandLine, clang::ModuleMap *ModuleMap) { - return llvm::make_unique(ModuleMapPath, IncludePaths, + return std::make_unique(ModuleMapPath, IncludePaths, CommandLine, ModuleMap); } Index: clang-tools-extra/modularize/Modularize.cpp =================================================================== --- clang-tools-extra/modularize/Modularize.cpp +++ clang-tools-extra/modularize/Modularize.cpp @@ -703,7 +703,7 @@ protected: std::unique_ptr CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override { - return llvm::make_unique( + return std::make_unique( Entities, PPTracker, CI.getPreprocessor(), InFile, HadErrors); } @@ -793,7 +793,7 @@ protected: std::unique_ptr CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override { - return llvm::make_unique(); + return std::make_unique(); } }; Index: clang-tools-extra/modularize/PreprocessorTracker.cpp =================================================================== --- clang-tools-extra/modularize/PreprocessorTracker.cpp +++ clang-tools-extra/modularize/PreprocessorTracker.cpp @@ -814,7 +814,7 @@ HeadersInThisCompile.clear(); assert((HeaderStack.size() == 0) && "Header stack should be empty."); pushHeaderHandle(addHeader(rootHeaderFile)); - PP.addPPCallbacks(llvm::make_unique(*this, PP, + PP.addPPCallbacks(std::make_unique(*this, PP, rootHeaderFile)); } // Handle exiting a preprocessing session. Index: clang-tools-extra/pp-trace/PPTrace.cpp =================================================================== --- clang-tools-extra/pp-trace/PPTrace.cpp +++ clang-tools-extra/pp-trace/PPTrace.cpp @@ -85,8 +85,8 @@ StringRef InFile) override { Preprocessor &PP = CI.getPreprocessor(); PP.addPPCallbacks( - llvm::make_unique(Filters, CallbackCalls, PP)); - return llvm::make_unique(); + std::make_unique(Filters, CallbackCalls, PP)); + return std::make_unique(); } void EndSourceFileAction() override { Index: clang-tools-extra/test/clang-tidy/modernize-make-unique-inaccessible-ctors.cpp =================================================================== --- clang-tools-extra/test/clang-tidy/modernize-make-unique-inaccessible-ctors.cpp +++ clang-tools-extra/test/clang-tidy/modernize-make-unique-inaccessible-ctors.cpp @@ -104,7 +104,7 @@ #ifdef CXX_14_17 - // FIXME: it is impossible to use make_unique for this case, the check should + // FIXME: it is impossible to use std::make_unique for this case, the check should // stop emitting the message. auto PNoCopyMoveCtor2 = std::unique_ptr(new NoCopyMoveCtor{1, 2}); // CHECK-MESSAGES-CXX-14-17: :[[@LINE-1]]:27: warning: use std::make_unique instead Index: clang-tools-extra/unittests/clang-doc/BitcodeTest.cpp =================================================================== --- clang-tools-extra/unittests/clang-doc/BitcodeTest.cpp +++ clang-tools-extra/unittests/clang-doc/BitcodeTest.cpp @@ -164,100 +164,100 @@ CommentInfo Top; Top.Kind = "FullComment"; - Top.Children.emplace_back(llvm::make_unique()); + Top.Children.emplace_back(std::make_unique()); CommentInfo *BlankLine = Top.Children.back().get(); BlankLine->Kind = "ParagraphComment"; - BlankLine->Children.emplace_back(llvm::make_unique()); + BlankLine->Children.emplace_back(std::make_unique()); BlankLine->Children.back()->Kind = "TextComment"; - Top.Children.emplace_back(llvm::make_unique()); + Top.Children.emplace_back(std::make_unique()); CommentInfo *Brief = Top.Children.back().get(); Brief->Kind = "ParagraphComment"; - Brief->Children.emplace_back(llvm::make_unique()); + Brief->Children.emplace_back(std::make_unique()); Brief->Children.back()->Kind = "TextComment"; Brief->Children.back()->Name = "ParagraphComment"; Brief->Children.back()->Text = " Brief description."; - Top.Children.emplace_back(llvm::make_unique()); + Top.Children.emplace_back(std::make_unique()); CommentInfo *Extended = Top.Children.back().get(); Extended->Kind = "ParagraphComment"; - Extended->Children.emplace_back(llvm::make_unique()); + Extended->Children.emplace_back(std::make_unique()); Extended->Children.back()->Kind = "TextComment"; Extended->Children.back()->Text = " Extended description that"; - Extended->Children.emplace_back(llvm::make_unique()); + Extended->Children.emplace_back(std::make_unique()); Extended->Children.back()->Kind = "TextComment"; Extended->Children.back()->Text = " continues onto the next line."; - Top.Children.emplace_back(llvm::make_unique()); + Top.Children.emplace_back(std::make_unique()); CommentInfo *HTML = Top.Children.back().get(); HTML->Kind = "ParagraphComment"; - HTML->Children.emplace_back(llvm::make_unique()); + HTML->Children.emplace_back(std::make_unique()); HTML->Children.back()->Kind = "TextComment"; - HTML->Children.emplace_back(llvm::make_unique()); + HTML->Children.emplace_back(std::make_unique()); 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()); + HTML->Children.emplace_back(std::make_unique()); HTML->Children.back()->Kind = "HTMLStartTagComment"; HTML->Children.back()->Name = "li"; - HTML->Children.emplace_back(llvm::make_unique()); + HTML->Children.emplace_back(std::make_unique()); HTML->Children.back()->Kind = "TextComment"; HTML->Children.back()->Text = " Testing."; - HTML->Children.emplace_back(llvm::make_unique()); + HTML->Children.emplace_back(std::make_unique()); HTML->Children.back()->Kind = "HTMLEndTagComment"; HTML->Children.back()->Name = "ul"; HTML->Children.back()->SelfClosing = true; - Top.Children.emplace_back(llvm::make_unique()); + Top.Children.emplace_back(std::make_unique()); CommentInfo *Verbatim = Top.Children.back().get(); Verbatim->Kind = "VerbatimBlockComment"; Verbatim->Name = "verbatim"; Verbatim->CloseName = "endverbatim"; - Verbatim->Children.emplace_back(llvm::make_unique()); + Verbatim->Children.emplace_back(std::make_unique()); Verbatim->Children.back()->Kind = "VerbatimBlockLineComment"; Verbatim->Children.back()->Text = " The description continues."; - Top.Children.emplace_back(llvm::make_unique()); + Top.Children.emplace_back(std::make_unique()); 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()); + ParamOut->Children.emplace_back(std::make_unique()); ParamOut->Children.back()->Kind = "ParagraphComment"; ParamOut->Children.back()->Children.emplace_back( - llvm::make_unique()); + std::make_unique()); ParamOut->Children.back()->Children.back()->Kind = "TextComment"; ParamOut->Children.back()->Children.emplace_back( - llvm::make_unique()); + std::make_unique()); ParamOut->Children.back()->Children.back()->Kind = "TextComment"; ParamOut->Children.back()->Children.back()->Text = " is a parameter."; - Top.Children.emplace_back(llvm::make_unique()); + Top.Children.emplace_back(std::make_unique()); CommentInfo *ParamIn = Top.Children.back().get(); ParamIn->Kind = "ParamCommandComment"; ParamIn->Direction = "[in]"; ParamIn->ParamName = "J"; - ParamIn->Children.emplace_back(llvm::make_unique()); + ParamIn->Children.emplace_back(std::make_unique()); ParamIn->Children.back()->Kind = "ParagraphComment"; ParamIn->Children.back()->Children.emplace_back( - llvm::make_unique()); + std::make_unique()); 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()); + std::make_unique()); ParamIn->Children.back()->Children.back()->Kind = "TextComment"; - Top.Children.emplace_back(llvm::make_unique()); + Top.Children.emplace_back(std::make_unique()); CommentInfo *Return = Top.Children.back().get(); Return->Kind = "BlockCommandComment"; Return->Name = "return"; Return->Explicit = true; - Return->Children.emplace_back(llvm::make_unique()); + Return->Children.emplace_back(std::make_unique()); Return->Children.back()->Kind = "ParagraphComment"; Return->Children.back()->Children.emplace_back( - llvm::make_unique()); + std::make_unique()); Return->Children.back()->Children.back()->Kind = "TextComment"; Return->Children.back()->Children.back()->Text = "void"; Index: clang-tools-extra/unittests/clang-doc/GeneratorTest.cpp =================================================================== --- clang-tools-extra/unittests/clang-doc/GeneratorTest.cpp +++ clang-tools-extra/unittests/clang-doc/GeneratorTest.cpp @@ -17,21 +17,21 @@ TEST(GeneratorTest, emitIndex) { Index Idx; - auto InfoA = llvm::make_unique(); + auto InfoA = std::make_unique(); InfoA->Name = "A"; InfoA->USR = serialize::hashUSR("1"); Generator::addInfoToIndex(Idx, InfoA.get()); - auto InfoC = llvm::make_unique(); + auto InfoC = std::make_unique(); 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(); + auto InfoD = std::make_unique(); InfoD->Name = "D"; InfoD->USR = serialize::hashUSR("4"); - auto InfoF = llvm::make_unique(); + auto InfoF = std::make_unique(); InfoF->Name = "F"; InfoF->USR = serialize::hashUSR("6"); Reference RefD = Reference("D"); @@ -40,7 +40,7 @@ RefE.USR = serialize::hashUSR("5"); InfoF->Namespace = {std::move(RefE), std::move(RefD)}; Generator::addInfoToIndex(Idx, InfoF.get()); - auto InfoG = llvm::make_unique(InfoType::IT_namespace); + auto InfoG = std::make_unique(InfoType::IT_namespace); Generator::addInfoToIndex(Idx, InfoG.get()); Index ExpectedIdx; Index: clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp =================================================================== --- clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp +++ clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp @@ -335,34 +335,34 @@ CommentInfo Top; Top.Kind = "FullComment"; - Top.Children.emplace_back(llvm::make_unique()); + Top.Children.emplace_back(std::make_unique()); CommentInfo *BlankLine = Top.Children.back().get(); BlankLine->Kind = "ParagraphComment"; - BlankLine->Children.emplace_back(llvm::make_unique()); + BlankLine->Children.emplace_back(std::make_unique()); BlankLine->Children.back()->Kind = "TextComment"; - Top.Children.emplace_back(llvm::make_unique()); + Top.Children.emplace_back(std::make_unique()); CommentInfo *Brief = Top.Children.back().get(); Brief->Kind = "ParagraphComment"; - Brief->Children.emplace_back(llvm::make_unique()); + Brief->Children.emplace_back(std::make_unique()); Brief->Children.back()->Kind = "TextComment"; Brief->Children.back()->Name = "ParagraphComment"; Brief->Children.back()->Text = " Brief description."; - Top.Children.emplace_back(llvm::make_unique()); + Top.Children.emplace_back(std::make_unique()); CommentInfo *Extended = Top.Children.back().get(); Extended->Kind = "ParagraphComment"; - Extended->Children.emplace_back(llvm::make_unique()); + Extended->Children.emplace_back(std::make_unique()); Extended->Children.back()->Kind = "TextComment"; Extended->Children.back()->Text = " Extended description that"; - Extended->Children.emplace_back(llvm::make_unique()); + Extended->Children.emplace_back(std::make_unique()); Extended->Children.back()->Kind = "TextComment"; Extended->Children.back()->Text = " continues onto the next line."; - Top.Children.emplace_back(llvm::make_unique()); + Top.Children.emplace_back(std::make_unique()); CommentInfo *Entities = Top.Children.back().get(); Entities->Kind = "ParagraphComment"; - Entities->Children.emplace_back(llvm::make_unique()); + Entities->Children.emplace_back(std::make_unique()); Entities->Children.back()->Kind = "TextComment"; Entities->Children.back()->Name = "ParagraphComment"; Entities->Children.back()->Text = Index: clang-tools-extra/unittests/clang-doc/MDGeneratorTest.cpp =================================================================== --- clang-tools-extra/unittests/clang-doc/MDGeneratorTest.cpp +++ clang-tools-extra/unittests/clang-doc/MDGeneratorTest.cpp @@ -217,100 +217,100 @@ CommentInfo Top; Top.Kind = "FullComment"; - Top.Children.emplace_back(llvm::make_unique()); + Top.Children.emplace_back(std::make_unique()); CommentInfo *BlankLine = Top.Children.back().get(); BlankLine->Kind = "ParagraphComment"; - BlankLine->Children.emplace_back(llvm::make_unique()); + BlankLine->Children.emplace_back(std::make_unique()); BlankLine->Children.back()->Kind = "TextComment"; - Top.Children.emplace_back(llvm::make_unique()); + Top.Children.emplace_back(std::make_unique()); CommentInfo *Brief = Top.Children.back().get(); Brief->Kind = "ParagraphComment"; - Brief->Children.emplace_back(llvm::make_unique()); + Brief->Children.emplace_back(std::make_unique()); Brief->Children.back()->Kind = "TextComment"; Brief->Children.back()->Name = "ParagraphComment"; Brief->Children.back()->Text = " Brief description."; - Top.Children.emplace_back(llvm::make_unique()); + Top.Children.emplace_back(std::make_unique()); CommentInfo *Extended = Top.Children.back().get(); Extended->Kind = "ParagraphComment"; - Extended->Children.emplace_back(llvm::make_unique()); + Extended->Children.emplace_back(std::make_unique()); Extended->Children.back()->Kind = "TextComment"; Extended->Children.back()->Text = " Extended description that"; - Extended->Children.emplace_back(llvm::make_unique()); + Extended->Children.emplace_back(std::make_unique()); Extended->Children.back()->Kind = "TextComment"; Extended->Children.back()->Text = " continues onto the next line."; - Top.Children.emplace_back(llvm::make_unique()); + Top.Children.emplace_back(std::make_unique()); CommentInfo *HTML = Top.Children.back().get(); HTML->Kind = "ParagraphComment"; - HTML->Children.emplace_back(llvm::make_unique()); + HTML->Children.emplace_back(std::make_unique()); HTML->Children.back()->Kind = "TextComment"; - HTML->Children.emplace_back(llvm::make_unique()); + HTML->Children.emplace_back(std::make_unique()); 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()); + HTML->Children.emplace_back(std::make_unique()); HTML->Children.back()->Kind = "HTMLStartTagComment"; HTML->Children.back()->Name = "li"; - HTML->Children.emplace_back(llvm::make_unique()); + HTML->Children.emplace_back(std::make_unique()); HTML->Children.back()->Kind = "TextComment"; HTML->Children.back()->Text = " Testing."; - HTML->Children.emplace_back(llvm::make_unique()); + HTML->Children.emplace_back(std::make_unique()); HTML->Children.back()->Kind = "HTMLEndTagComment"; HTML->Children.back()->Name = "ul"; HTML->Children.back()->SelfClosing = true; - Top.Children.emplace_back(llvm::make_unique()); + Top.Children.emplace_back(std::make_unique()); CommentInfo *Verbatim = Top.Children.back().get(); Verbatim->Kind = "VerbatimBlockComment"; Verbatim->Name = "verbatim"; Verbatim->CloseName = "endverbatim"; - Verbatim->Children.emplace_back(llvm::make_unique()); + Verbatim->Children.emplace_back(std::make_unique()); Verbatim->Children.back()->Kind = "VerbatimBlockLineComment"; Verbatim->Children.back()->Text = " The description continues."; - Top.Children.emplace_back(llvm::make_unique()); + Top.Children.emplace_back(std::make_unique()); 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()); + ParamOut->Children.emplace_back(std::make_unique()); ParamOut->Children.back()->Kind = "ParagraphComment"; ParamOut->Children.back()->Children.emplace_back( - llvm::make_unique()); + std::make_unique()); ParamOut->Children.back()->Children.back()->Kind = "TextComment"; ParamOut->Children.back()->Children.emplace_back( - llvm::make_unique()); + std::make_unique()); ParamOut->Children.back()->Children.back()->Kind = "TextComment"; ParamOut->Children.back()->Children.back()->Text = " is a parameter."; - Top.Children.emplace_back(llvm::make_unique()); + Top.Children.emplace_back(std::make_unique()); CommentInfo *ParamIn = Top.Children.back().get(); ParamIn->Kind = "ParamCommandComment"; ParamIn->Direction = "[in]"; ParamIn->ParamName = "J"; - ParamIn->Children.emplace_back(llvm::make_unique()); + ParamIn->Children.emplace_back(std::make_unique()); ParamIn->Children.back()->Kind = "ParagraphComment"; ParamIn->Children.back()->Children.emplace_back( - llvm::make_unique()); + std::make_unique()); 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()); + std::make_unique()); ParamIn->Children.back()->Children.back()->Kind = "TextComment"; - Top.Children.emplace_back(llvm::make_unique()); + Top.Children.emplace_back(std::make_unique()); CommentInfo *Return = Top.Children.back().get(); Return->Kind = "BlockCommandComment"; Return->Name = "return"; Return->Explicit = true; - Return->Children.emplace_back(llvm::make_unique()); + Return->Children.emplace_back(std::make_unique()); Return->Children.back()->Kind = "ParagraphComment"; Return->Children.back()->Children.emplace_back( - llvm::make_unique()); + std::make_unique()); Return->Children.back()->Children.back()->Kind = "TextComment"; Return->Children.back()->Children.back()->Text = "void"; Index: clang-tools-extra/unittests/clang-doc/MergeTest.cpp =================================================================== --- clang-tools-extra/unittests/clang-doc/MergeTest.cpp +++ clang-tools-extra/unittests/clang-doc/MergeTest.cpp @@ -43,10 +43,10 @@ Two.ChildEnums.back().Name = "TwoEnum"; std::vector> Infos; - Infos.emplace_back(llvm::make_unique(std::move(One))); - Infos.emplace_back(llvm::make_unique(std::move(Two))); + Infos.emplace_back(std::make_unique(std::move(One))); + Infos.emplace_back(std::make_unique(std::move(Two))); - auto Expected = llvm::make_unique(); + auto Expected = std::make_unique(); Expected->Name = "Namespace"; Expected->Namespace.emplace_back(EmptySID, "A", InfoType::IT_namespace); @@ -112,10 +112,10 @@ Two.ChildEnums.back().Name = "TwoEnum"; std::vector> Infos; - Infos.emplace_back(llvm::make_unique(std::move(One))); - Infos.emplace_back(llvm::make_unique(std::move(Two))); + Infos.emplace_back(std::make_unique(std::move(One))); + Infos.emplace_back(std::make_unique(std::move(Two))); - auto Expected = llvm::make_unique(); + auto Expected = std::make_unique(); Expected->Name = "r"; Expected->Namespace.emplace_back(EmptySID, "A", InfoType::IT_namespace); @@ -160,9 +160,9 @@ One.Description.emplace_back(); auto OneFullComment = &One.Description.back(); OneFullComment->Kind = "FullComment"; - auto OneParagraphComment = llvm::make_unique(); + auto OneParagraphComment = std::make_unique(); OneParagraphComment->Kind = "ParagraphComment"; - auto OneTextComment = llvm::make_unique(); + auto OneTextComment = std::make_unique(); OneTextComment->Kind = "TextComment"; OneTextComment->Text = "This is a text comment."; OneParagraphComment->Children.push_back(std::move(OneTextComment)); @@ -180,19 +180,19 @@ Two.Description.emplace_back(); auto TwoFullComment = &Two.Description.back(); TwoFullComment->Kind = "FullComment"; - auto TwoParagraphComment = llvm::make_unique(); + auto TwoParagraphComment = std::make_unique(); TwoParagraphComment->Kind = "ParagraphComment"; - auto TwoTextComment = llvm::make_unique(); + auto TwoTextComment = std::make_unique(); 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> Infos; - Infos.emplace_back(llvm::make_unique(std::move(One))); - Infos.emplace_back(llvm::make_unique(std::move(Two))); + Infos.emplace_back(std::make_unique(std::move(One))); + Infos.emplace_back(std::make_unique(std::move(Two))); - auto Expected = llvm::make_unique(); + auto Expected = std::make_unique(); Expected->Name = "f"; Expected->Namespace.emplace_back(EmptySID, "A", InfoType::IT_namespace); @@ -207,9 +207,9 @@ Expected->Description.emplace_back(); auto ExpectedFullComment = &Expected->Description.back(); ExpectedFullComment->Kind = "FullComment"; - auto ExpectedParagraphComment = llvm::make_unique(); + auto ExpectedParagraphComment = std::make_unique(); ExpectedParagraphComment->Kind = "ParagraphComment"; - auto ExpectedTextComment = llvm::make_unique(); + auto ExpectedTextComment = std::make_unique(); ExpectedTextComment->Kind = "TextComment"; ExpectedTextComment->Text = "This is a text comment."; ExpectedParagraphComment->Children.push_back(std::move(ExpectedTextComment)); @@ -241,10 +241,10 @@ Two.Members.emplace_back("Y"); std::vector> Infos; - Infos.emplace_back(llvm::make_unique(std::move(One))); - Infos.emplace_back(llvm::make_unique(std::move(Two))); + Infos.emplace_back(std::make_unique(std::move(One))); + Infos.emplace_back(std::make_unique(std::move(Two))); - auto Expected = llvm::make_unique(); + auto Expected = std::make_unique(); Expected->Name = "e"; Expected->Namespace.emplace_back(EmptySID, "A", InfoType::IT_namespace); Index: clang-tools-extra/unittests/clang-doc/YAMLGeneratorTest.cpp =================================================================== --- clang-tools-extra/unittests/clang-doc/YAMLGeneratorTest.cpp +++ clang-tools-extra/unittests/clang-doc/YAMLGeneratorTest.cpp @@ -246,100 +246,100 @@ CommentInfo Top; Top.Kind = "FullComment"; - Top.Children.emplace_back(llvm::make_unique()); + Top.Children.emplace_back(std::make_unique()); CommentInfo *BlankLine = Top.Children.back().get(); BlankLine->Kind = "ParagraphComment"; - BlankLine->Children.emplace_back(llvm::make_unique()); + BlankLine->Children.emplace_back(std::make_unique()); BlankLine->Children.back()->Kind = "TextComment"; - Top.Children.emplace_back(llvm::make_unique()); + Top.Children.emplace_back(std::make_unique()); CommentInfo *Brief = Top.Children.back().get(); Brief->Kind = "ParagraphComment"; - Brief->Children.emplace_back(llvm::make_unique()); + Brief->Children.emplace_back(std::make_unique()); Brief->Children.back()->Kind = "TextComment"; Brief->Children.back()->Name = "ParagraphComment"; Brief->Children.back()->Text = " Brief description."; - Top.Children.emplace_back(llvm::make_unique()); + Top.Children.emplace_back(std::make_unique()); CommentInfo *Extended = Top.Children.back().get(); Extended->Kind = "ParagraphComment"; - Extended->Children.emplace_back(llvm::make_unique()); + Extended->Children.emplace_back(std::make_unique()); Extended->Children.back()->Kind = "TextComment"; Extended->Children.back()->Text = " Extended description that"; - Extended->Children.emplace_back(llvm::make_unique()); + Extended->Children.emplace_back(std::make_unique()); Extended->Children.back()->Kind = "TextComment"; Extended->Children.back()->Text = " continues onto the next line."; - Top.Children.emplace_back(llvm::make_unique()); + Top.Children.emplace_back(std::make_unique()); CommentInfo *HTML = Top.Children.back().get(); HTML->Kind = "ParagraphComment"; - HTML->Children.emplace_back(llvm::make_unique()); + HTML->Children.emplace_back(std::make_unique()); HTML->Children.back()->Kind = "TextComment"; - HTML->Children.emplace_back(llvm::make_unique()); + HTML->Children.emplace_back(std::make_unique()); 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()); + HTML->Children.emplace_back(std::make_unique()); HTML->Children.back()->Kind = "HTMLStartTagComment"; HTML->Children.back()->Name = "li"; - HTML->Children.emplace_back(llvm::make_unique()); + HTML->Children.emplace_back(std::make_unique()); HTML->Children.back()->Kind = "TextComment"; HTML->Children.back()->Text = " Testing."; - HTML->Children.emplace_back(llvm::make_unique()); + HTML->Children.emplace_back(std::make_unique()); HTML->Children.back()->Kind = "HTMLEndTagComment"; HTML->Children.back()->Name = "ul"; HTML->Children.back()->SelfClosing = true; - Top.Children.emplace_back(llvm::make_unique()); + Top.Children.emplace_back(std::make_unique()); CommentInfo *Verbatim = Top.Children.back().get(); Verbatim->Kind = "VerbatimBlockComment"; Verbatim->Name = "verbatim"; Verbatim->CloseName = "endverbatim"; - Verbatim->Children.emplace_back(llvm::make_unique()); + Verbatim->Children.emplace_back(std::make_unique()); Verbatim->Children.back()->Kind = "VerbatimBlockLineComment"; Verbatim->Children.back()->Text = " The description continues."; - Top.Children.emplace_back(llvm::make_unique()); + Top.Children.emplace_back(std::make_unique()); 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()); + ParamOut->Children.emplace_back(std::make_unique()); ParamOut->Children.back()->Kind = "ParagraphComment"; ParamOut->Children.back()->Children.emplace_back( - llvm::make_unique()); + std::make_unique()); ParamOut->Children.back()->Children.back()->Kind = "TextComment"; ParamOut->Children.back()->Children.emplace_back( - llvm::make_unique()); + std::make_unique()); ParamOut->Children.back()->Children.back()->Kind = "TextComment"; ParamOut->Children.back()->Children.back()->Text = " is a parameter."; - Top.Children.emplace_back(llvm::make_unique()); + Top.Children.emplace_back(std::make_unique()); CommentInfo *ParamIn = Top.Children.back().get(); ParamIn->Kind = "ParamCommandComment"; ParamIn->Direction = "[in]"; ParamIn->ParamName = "J"; - ParamIn->Children.emplace_back(llvm::make_unique()); + ParamIn->Children.emplace_back(std::make_unique()); ParamIn->Children.back()->Kind = "ParagraphComment"; ParamIn->Children.back()->Children.emplace_back( - llvm::make_unique()); + std::make_unique()); 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()); + std::make_unique()); ParamIn->Children.back()->Children.back()->Kind = "TextComment"; - Top.Children.emplace_back(llvm::make_unique()); + Top.Children.emplace_back(std::make_unique()); CommentInfo *Return = Top.Children.back().get(); Return->Kind = "BlockCommandComment"; Return->Name = "return"; Return->Explicit = true; - Return->Children.emplace_back(llvm::make_unique()); + Return->Children.emplace_back(std::make_unique()); Return->Children.back()->Kind = "ParagraphComment"; Return->Children.back()->Children.emplace_back( - llvm::make_unique()); + std::make_unique()); Return->Children.back()->Children.back()->Kind = "TextComment"; Return->Children.back()->Children.back()->Text = "void"; Index: clang-tools-extra/unittests/clang-include-fixer/IncludeFixerTest.cpp =================================================================== --- clang-tools-extra/unittests/clang-include-fixer/IncludeFixerTest.cpp +++ clang-tools-extra/unittests/clang-include-fixer/IncludeFixerTest.cpp @@ -92,9 +92,9 @@ {SymbolInfo("foo2", SymbolInfo::SymbolKind::Class, "\"foo2.h\"", {}), SymbolInfo::Signals{}}, }; - auto SymbolIndexMgr = llvm::make_unique(); + auto SymbolIndexMgr = std::make_unique(); SymbolIndexMgr->addSymbolIndex( - [=]() { return llvm::make_unique(Symbols); }); + [=]() { return std::make_unique(Symbols); }); std::vector FixerContexts; IncludeFixerActionFactory Factory(*SymbolIndexMgr, FixerContexts, "llvm"); Index: clang-tools-extra/unittests/clang-move/ClangMoveTests.cpp =================================================================== --- clang-tools-extra/unittests/clang-move/ClangMoveTests.cpp +++ clang-tools-extra/unittests/clang-move/ClangMoveTests.cpp @@ -227,7 +227,7 @@ ClangMoveContext MoveContext = {Spec, FileToReplacements, WorkingDir, "LLVM", Reporter != nullptr}; - auto Factory = llvm::make_unique( + auto Factory = std::make_unique( &MoveContext, Reporter); // std::string IncludeArg = Twine("-I" + WorkingDir; Index: clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h =================================================================== --- clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h +++ clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h @@ -40,7 +40,7 @@ static void createChecks(ClangTidyContext *Context, SmallVectorImpl> &Result) { - Result.emplace_back(llvm::make_unique( + Result.emplace_back(std::make_unique( "test-check-" + std::to_string(Result.size()), Context)); } }; @@ -88,7 +88,7 @@ std::map()) { ClangTidyOptions Options = ExtraOptions; Options.Checks = "*"; - ClangTidyContext Context(llvm::make_unique( + ClangTidyContext Context(std::make_unique( ClangTidyGlobalOptions(), Options)); ClangTidyDiagnosticConsumer DiagConsumer(Context); DiagnosticsEngine DE(new DiagnosticIDs(), new DiagnosticOptions, Index: clang-tools-extra/unittests/clang-tidy/IncludeInserterTest.cpp =================================================================== --- clang-tools-extra/unittests/clang-tidy/IncludeInserterTest.cpp +++ clang-tools-extra/unittests/clang-tidy/IncludeInserterTest.cpp @@ -33,7 +33,7 @@ void registerPPCallbacks(const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) override { - Inserter = llvm::make_unique( + Inserter = std::make_unique( SM, getLangOpts(), utils::IncludeSorter::IS_Google); PP->addPPCallbacks(Inserter->CreatePPCallbacks()); } Index: clang/examples/AnnotateFunctions/AnnotateFunctions.cpp =================================================================== --- clang/examples/AnnotateFunctions/AnnotateFunctions.cpp +++ clang/examples/AnnotateFunctions/AnnotateFunctions.cpp @@ -41,7 +41,7 @@ public: std::unique_ptr CreateASTConsumer(CompilerInstance &CI, llvm::StringRef) override { - return llvm::make_unique(); + return std::make_unique(); } bool ParseArgs(const CompilerInstance &CI, Index: clang/examples/PrintFunctionNames/PrintFunctionNames.cpp =================================================================== --- clang/examples/PrintFunctionNames/PrintFunctionNames.cpp +++ clang/examples/PrintFunctionNames/PrintFunctionNames.cpp @@ -81,7 +81,7 @@ protected: std::unique_ptr CreateASTConsumer(CompilerInstance &CI, llvm::StringRef) override { - return llvm::make_unique(CI, ParsedTemplates); + return std::make_unique(CI, ParsedTemplates); } bool ParseArgs(const CompilerInstance &CI, Index: clang/examples/clang-interpreter/main.cpp =================================================================== --- clang/examples/clang-interpreter/main.cpp +++ clang/examples/clang-interpreter/main.cpp @@ -58,7 +58,7 @@ IRCompileLayer CompileLayer{ES, ObjectLayer, SimpleCompiler(*TM)}; static std::unique_ptr createMemMgr() { - return llvm::make_unique(); + return std::make_unique(); } SimpleJIT( Index: clang/include/clang/AST/ASTImporterSharedState.h =================================================================== --- clang/include/clang/AST/ASTImporterSharedState.h +++ clang/include/clang/AST/ASTImporterSharedState.h @@ -47,7 +47,7 @@ ASTImporterSharedState() = default; ASTImporterSharedState(TranslationUnitDecl &ToTU) { - LookupTable = llvm::make_unique(ToTU); + LookupTable = std::make_unique(ToTU); } ASTImporterLookupTable *getLookupTable() { return LookupTable.get(); } Index: clang/include/clang/Basic/SyncScope.h =================================================================== --- clang/include/clang/Basic/SyncScope.h +++ clang/include/clang/Basic/SyncScope.h @@ -144,7 +144,7 @@ case AtomicScopeModelKind::None: return std::unique_ptr{}; case AtomicScopeModelKind::OpenCL: - return llvm::make_unique(); + return std::make_unique(); } llvm_unreachable("Invalid atomic scope model kind"); } Index: clang/include/clang/Frontend/ASTUnit.h =================================================================== --- clang/include/clang/Frontend/ASTUnit.h +++ clang/include/clang/Frontend/ASTUnit.h @@ -315,7 +315,7 @@ CodeCompletionTUInfo &getCodeCompletionTUInfo() { if (!CCTUInfo) - CCTUInfo = llvm::make_unique( + CCTUInfo = std::make_unique( std::make_shared()); return *CCTUInfo; } Index: clang/include/clang/Lex/Preprocessor.h =================================================================== --- clang/include/clang/Lex/Preprocessor.h +++ clang/include/clang/Lex/Preprocessor.h @@ -994,7 +994,7 @@ PPCallbacks *getPPCallbacks() const { return Callbacks.get(); } void addPPCallbacks(std::unique_ptr C) { if (Callbacks) - C = llvm::make_unique(std::move(C), + C = std::make_unique(std::move(C), std::move(Callbacks)); Callbacks = std::move(C); } @@ -1471,7 +1471,7 @@ if (LexLevel) { // It's not correct in general to enter caching lex mode while in the // middle of a nested lexing action. - auto TokCopy = llvm::make_unique(1); + auto TokCopy = std::make_unique(1); TokCopy[0] = Tok; EnterTokenStream(std::move(TokCopy), 1, true, IsReinject); } else { Index: clang/include/clang/Sema/SemaInternal.h =================================================================== --- clang/include/clang/Sema/SemaInternal.h +++ clang/include/clang/Sema/SemaInternal.h @@ -97,7 +97,7 @@ bool EnteringContext) : Typo(TypoName.getName().getAsIdentifierInfo()), CurrentTCIndex(0), SavedTCIndex(0), SemaRef(SemaRef), S(S), - SS(SS ? llvm::make_unique(*SS) : nullptr), + SS(SS ? std::make_unique(*SS) : nullptr), CorrectionValidator(std::move(CCC)), MemberContext(MemberContext), Result(SemaRef, TypoName, LookupKind), Namespaces(SemaRef.Context, SemaRef.CurContext, SS), Index: clang/include/clang/Sema/TypoCorrection.h =================================================================== --- clang/include/clang/Sema/TypoCorrection.h +++ clang/include/clang/Sema/TypoCorrection.h @@ -356,7 +356,7 @@ : CorrectionCandidateCallback(Typo, TypoNNS) {} std::unique_ptr clone() override { - return llvm::make_unique(*this); + return std::make_unique(*this); } }; @@ -369,7 +369,7 @@ return candidate.getCorrectionDeclAs(); } std::unique_ptr clone() override { - return llvm::make_unique(*this); + return std::make_unique(*this); } }; @@ -384,7 +384,7 @@ bool ValidateCandidate(const TypoCorrection &candidate) override; std::unique_ptr clone() override { - return llvm::make_unique(*this); + return std::make_unique(*this); } private: @@ -409,7 +409,7 @@ return false; } std::unique_ptr clone() override { - return llvm::make_unique(*this); + return std::make_unique(*this); } }; Index: clang/include/clang/Serialization/ASTReader.h =================================================================== --- clang/include/clang/Serialization/ASTReader.h +++ clang/include/clang/Serialization/ASTReader.h @@ -1578,7 +1578,7 @@ /// Takes ownership of \p L. void addListener(std::unique_ptr L) { if (Listener) - L = llvm::make_unique(std::move(L), + L = std::make_unique(std::move(L), std::move(Listener)); Listener = std::move(L); } @@ -1594,7 +1594,7 @@ auto Old = Reader.takeListener(); if (Old) { Chained = true; - L = llvm::make_unique(std::move(L), + L = std::make_unique(std::move(L), std::move(Old)); } Reader.setListener(std::move(L)); Index: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h =================================================================== --- clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h +++ clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h @@ -646,7 +646,7 @@ public: const NoteTag *makeNoteTag(Callback &&Cb, bool IsPrunable = false) { - // We cannot use make_unique because we cannot access the private + // We cannot use std::make_unique because we cannot access the private // constructor from inside it. std::unique_ptr T(new NoteTag(std::move(Cb), IsPrunable)); Tags.push_back(std::move(T)); Index: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h =================================================================== --- clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h +++ clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h @@ -337,7 +337,7 @@ bool IsSink = false); std::unique_ptr MakeEmptyGraph() const { - return llvm::make_unique(); + return std::make_unique(); } /// addRoot - Add an untyped node to the set of roots. Index: clang/include/clang/Tooling/ASTDiff/ASTDiff.h =================================================================== --- clang/include/clang/Tooling/ASTDiff/ASTDiff.h +++ clang/include/clang/Tooling/ASTDiff/ASTDiff.h @@ -71,7 +71,7 @@ /// Constructs a tree from any AST node. template SyntaxTree(T *Node, ASTContext &AST) - : TreeImpl(llvm::make_unique(this, Node, AST)) {} + : TreeImpl(std::make_unique(this, Node, AST)) {} SyntaxTree(SyntaxTree &&Other) = default; ~SyntaxTree(); Index: clang/include/clang/Tooling/Refactoring/RefactoringActionRulesInternal.h =================================================================== --- clang/include/clang/Tooling/Refactoring/RefactoringActionRulesInternal.h +++ clang/include/clang/Tooling/Refactoring/RefactoringActionRulesInternal.h @@ -148,7 +148,7 @@ std::tuple Requirements; }; - return llvm::make_unique(std::make_tuple(Requirements...)); + return std::make_unique(std::make_tuple(Requirements...)); } } // end namespace tooling Index: clang/lib/ARCMigrate/ARCMT.cpp =================================================================== --- clang/lib/ARCMigrate/ARCMT.cpp +++ clang/lib/ARCMigrate/ARCMT.cpp @@ -453,8 +453,8 @@ std::unique_ptr CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override { CI.getPreprocessor().addPPCallbacks( - llvm::make_unique(ARCMTMacroLocs)); - return llvm::make_unique(); + std::make_unique(ARCMTMacroLocs)); + return std::make_unique(); } }; Index: clang/lib/ARCMigrate/ObjCMT.cpp =================================================================== --- clang/lib/ARCMigrate/ObjCMT.cpp +++ clang/lib/ARCMigrate/ObjCMT.cpp @@ -208,10 +208,10 @@ CI.getPreprocessor().addPPCallbacks(std::unique_ptr(PPRec)); std::vector> Consumers; Consumers.push_back(WrapperFrontendAction::CreateASTConsumer(CI, InFile)); - Consumers.push_back(llvm::make_unique( + Consumers.push_back(std::make_unique( MigrateDir, ObjCMigAction, Remapper, CompInst->getFileManager(), PPRec, CompInst->getPreprocessor(), false, None)); - return llvm::make_unique(std::move(Consumers)); + return std::make_unique(std::move(Consumers)); } bool ObjCMigrateAction::BeginInvocation(CompilerInstance &CI) { @@ -2034,7 +2034,7 @@ CI.getPreprocessor().addPPCallbacks(std::unique_ptr(PPRec)); std::vector WhiteList = getWhiteListFilenames(CI.getFrontendOpts().ObjCMTWhiteListPath); - return llvm::make_unique( + return std::make_unique( CI.getFrontendOpts().OutputFile, ObjCMTAction, Remapper, CI.getFileManager(), PPRec, CI.getPreprocessor(), /*isOutputFile=*/true, WhiteList); Index: clang/lib/AST/ASTContext.cpp =================================================================== --- clang/lib/AST/ASTContext.cpp +++ clang/lib/AST/ASTContext.cpp @@ -10472,7 +10472,7 @@ if (!Parents) // We build the parent map for the traversal scope (usually whole TU), as // hasAncestor can escape any subtree. - Parents = llvm::make_unique(*this); + Parents = std::make_unique(*this); return Parents->getParents(Node); } Index: clang/lib/AST/CXXInheritance.cpp =================================================================== --- clang/lib/AST/CXXInheritance.cpp +++ clang/lib/AST/CXXInheritance.cpp @@ -44,7 +44,7 @@ Decls.insert(Path->Decls.front()); NumDeclsFound = Decls.size(); - DeclsFound = llvm::make_unique(NumDeclsFound); + DeclsFound = std::make_unique(NumDeclsFound); std::copy(Decls.begin(), Decls.end(), DeclsFound.get()); } Index: clang/lib/AST/ExternalASTMerger.cpp =================================================================== --- clang/lib/AST/ExternalASTMerger.cpp +++ clang/lib/AST/ExternalASTMerger.cpp @@ -320,7 +320,7 @@ void ExternalASTMerger::AddSources(llvm::ArrayRef Sources) { for (const ImporterSource &S : Sources) { assert(&S.AST != &Target.AST); - Importers.push_back(llvm::make_unique( + Importers.push_back(std::make_unique( *this, Target.AST, Target.FM, S.AST, S.FM, S.OM)); } } Index: clang/lib/AST/ItaniumCXXABI.cpp =================================================================== --- clang/lib/AST/ItaniumCXXABI.cpp +++ clang/lib/AST/ItaniumCXXABI.cpp @@ -218,7 +218,7 @@ std::unique_ptr createMangleNumberingContext() const override { - return llvm::make_unique(); + return std::make_unique(); } }; } Index: clang/lib/AST/Mangle.cpp =================================================================== --- clang/lib/AST/Mangle.cpp +++ clang/lib/AST/Mangle.cpp @@ -470,7 +470,7 @@ }; ASTNameGenerator::ASTNameGenerator(ASTContext &Ctx) - : Impl(llvm::make_unique(Ctx)) {} + : Impl(std::make_unique(Ctx)) {} ASTNameGenerator::~ASTNameGenerator() {} Index: clang/lib/AST/MicrosoftCXXABI.cpp =================================================================== --- clang/lib/AST/MicrosoftCXXABI.cpp +++ clang/lib/AST/MicrosoftCXXABI.cpp @@ -132,7 +132,7 @@ std::unique_ptr createMangleNumberingContext() const override { - return llvm::make_unique(); + return std::make_unique(); } }; } Index: clang/lib/AST/VTableBuilder.cpp =================================================================== --- clang/lib/AST/VTableBuilder.cpp +++ clang/lib/AST/VTableBuilder.cpp @@ -2268,7 +2268,7 @@ SmallVector VTableThunks(Builder.vtable_thunks_begin(), Builder.vtable_thunks_end()); - return llvm::make_unique( + return std::make_unique( Builder.VTableIndices, Builder.vtable_components(), VTableThunks, Builder.getAddressPoints()); } @@ -3253,7 +3253,7 @@ // Base case: this subobject has its own vptr. if (ForVBTables ? Layout.hasOwnVBPtr() : Layout.hasOwnVFPtr()) - Paths.push_back(llvm::make_unique(RD)); + Paths.push_back(std::make_unique(RD)); // Recursive case: get all the vbtables from our bases and remove anything // that shares a virtual base. @@ -3276,7 +3276,7 @@ continue; // Copy the path and adjust it as necessary. - auto P = llvm::make_unique(*BaseInfo); + auto P = std::make_unique(*BaseInfo); // We mangle Base into the path if the path would've been ambiguous and it // wasn't already extended with Base. @@ -3562,7 +3562,7 @@ const VTableLayout::AddressPointsMapTy EmptyAddressPointsMap; { - auto VFPtrs = llvm::make_unique(); + auto VFPtrs = std::make_unique(); computeVTablePaths(/*ForVBTables=*/false, RD, *VFPtrs); computeFullPathsForVFTables(Context, RD, *VFPtrs); VFPtrLocations[RD] = std::move(VFPtrs); @@ -3576,7 +3576,7 @@ assert(VFTableLayouts.count(id) == 0); SmallVector VTableThunks( Builder.vtable_thunks_begin(), Builder.vtable_thunks_end()); - VFTableLayouts[id] = llvm::make_unique( + VFTableLayouts[id] = std::make_unique( ArrayRef{0}, Builder.vtable_components(), VTableThunks, EmptyAddressPointsMap); Thunks.insert(Builder.thunks_begin(), Builder.thunks_end()); @@ -3668,7 +3668,7 @@ std::unique_ptr &Entry = VBaseInfo[RD]; if (Entry) return *Entry; - Entry = llvm::make_unique(); + Entry = std::make_unique(); VBI = Entry.get(); } Index: clang/lib/ASTMatchers/ASTMatchFinder.cpp =================================================================== --- clang/lib/ASTMatchers/ASTMatchFinder.cpp +++ clang/lib/ASTMatchers/ASTMatchFinder.cpp @@ -1078,7 +1078,7 @@ } std::unique_ptr MatchFinder::newASTConsumer() { - return llvm::make_unique(this, ParsingDone); + return std::make_unique(this, ParsingDone); } void MatchFinder::match(const clang::ast_type_traits::DynTypedNode &Node, Index: clang/lib/ASTMatchers/Dynamic/Marshallers.h =================================================================== --- clang/lib/ASTMatchers/Dynamic/Marshallers.h +++ clang/lib/ASTMatchers/Dynamic/Marshallers.h @@ -729,7 +729,7 @@ makeMatcherAutoMarshall(ReturnType (*Func)(), StringRef MatcherName) { std::vector RetTypes; BuildReturnTypeVector::build(RetTypes); - return llvm::make_unique( + return std::make_unique( matcherMarshall0, reinterpret_cast(Func), MatcherName, RetTypes, None); } @@ -741,7 +741,7 @@ std::vector RetTypes; BuildReturnTypeVector::build(RetTypes); ArgKind AK = ArgTypeTraits::getKind(); - return llvm::make_unique( + return std::make_unique( matcherMarshall1, reinterpret_cast(Func), MatcherName, RetTypes, AK); } @@ -755,7 +755,7 @@ BuildReturnTypeVector::build(RetTypes); ArgKind AKs[] = { ArgTypeTraits::getKind(), ArgTypeTraits::getKind() }; - return llvm::make_unique( + return std::make_unique( matcherMarshall2, reinterpret_cast(Func), MatcherName, RetTypes, AKs); } @@ -766,7 +766,7 @@ std::unique_ptr makeMatcherAutoMarshall( ast_matchers::internal::VariadicFunction VarFunc, StringRef MatcherName) { - return llvm::make_unique(VarFunc, MatcherName); + return std::make_unique(VarFunc, MatcherName); } /// Overload for VariadicDynCastAllOfMatchers. @@ -778,7 +778,7 @@ ast_matchers::internal::VariadicDynCastAllOfMatcher VarFunc, StringRef MatcherName) { - return llvm::make_unique(VarFunc, MatcherName); + return std::make_unique(VarFunc, MatcherName); } /// Argument adaptative overload. @@ -791,7 +791,7 @@ std::vector> Overloads; AdaptativeOverloadCollector(MatcherName, Overloads); - return llvm::make_unique(Overloads); + return std::make_unique(Overloads); } template