summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang-tools-extra/clang-change-namespace/ChangeNamespace.cpp2
-rw-r--r--clang-tools-extra/clang-doc/BitcodeReader.cpp4
-rw-r--r--clang-tools-extra/clang-doc/ClangDoc.cpp4
-rw-r--r--clang-tools-extra/clang-doc/HTMLGenerator.cpp102
-rw-r--r--clang-tools-extra/clang-doc/Representation.cpp2
-rw-r--r--clang-tools-extra/clang-doc/Serialize.cpp24
-rw-r--r--clang-tools-extra/clang-include-fixer/FuzzySymbolIndex.cpp2
-rw-r--r--clang-tools-extra/clang-include-fixer/IncludeFixer.cpp4
-rw-r--r--clang-tools-extra/clang-include-fixer/find-all-symbols/FindAllSymbolsAction.cpp2
-rw-r--r--clang-tools-extra/clang-include-fixer/find-all-symbols/tool/FindAllSymbolsMain.cpp2
-rw-r--r--clang-tools-extra/clang-include-fixer/plugin/IncludeFixerPlugin.cpp2
-rw-r--r--clang-tools-extra/clang-include-fixer/tool/ClangIncludeFixer.cpp4
-rw-r--r--clang-tools-extra/clang-move/HelperDeclRefGraph.cpp2
-rw-r--r--clang-tools-extra/clang-move/Move.cpp12
-rw-r--r--clang-tools-extra/clang-reorder-fields/ReorderFieldsAction.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/ClangTidy.cpp10
-rw-r--r--clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp6
-rw-r--r--clang-tools-extra/clang-tidy/ClangTidyOptions.h2
-rw-r--r--clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.cpp6
-rw-r--r--clang-tools-extra/clang-tidy/abseil/StringFindStartswithCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/bugprone/LambdaFunctionNameCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/bugprone/MacroParenthesesCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/bugprone/MacroRepeatedSideEffectsCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp4
-rw-r--r--clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/cppcoreguidelines/MacroUsageCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/fuchsia/RestrictSystemIncludesCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/google/AvoidUnderscoreInGoogletestNameCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/google/IntegerTypesCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/google/TodoCommentCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/google/UpgradeGoogletestCaseCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/misc/UnusedParametersCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp4
-rw-r--r--clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/modernize/ReplaceRandomShuffleCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/performance/MoveConstructorInitCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/performance/TypePromotionInMathFnCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/plugin/ClangTidyPlugin.cpp8
-rw-r--r--clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/readability/RedundantPreprocessorCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp4
-rw-r--r--clang-tools-extra/clang-tidy/utils/HeaderGuard.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/utils/IncludeInserter.cpp6
-rw-r--r--clang-tools-extra/clang-tidy/utils/IncludeInserter.h2
-rw-r--r--clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.cpp2
-rw-r--r--clang-tools-extra/clangd/ClangdLSPServer.cpp2
-rw-r--r--clang-tools-extra/clangd/ClangdServer.cpp6
-rw-r--r--clang-tools-extra/clangd/ClangdUnit.cpp14
-rw-r--r--clang-tools-extra/clangd/CodeComplete.cpp4
-rw-r--r--clang-tools-extra/clangd/Compiler.cpp2
-rw-r--r--clang-tools-extra/clangd/Context.h4
-rw-r--r--clang-tools-extra/clangd/Headers.cpp2
-rw-r--r--clang-tools-extra/clangd/JSONTransport.cpp2
-rw-r--r--clang-tools-extra/clangd/QueryDriverDatabase.cpp2
-rw-r--r--clang-tools-extra/clangd/TUScheduler.cpp10
-rw-r--r--clang-tools-extra/clangd/Trace.cpp4
-rw-r--r--clang-tools-extra/clangd/URI.cpp2
-rw-r--r--clang-tools-extra/clangd/index/Background.cpp16
-rw-r--r--clang-tools-extra/clangd/index/BackgroundIndexStorage.cpp8
-rw-r--r--clang-tools-extra/clangd/index/CanonicalIncludes.cpp2
-rw-r--r--clang-tools-extra/clangd/index/FileIndex.cpp20
-rw-r--r--clang-tools-extra/clangd/index/IndexAction.cpp6
-rw-r--r--clang-tools-extra/clangd/index/MemIndex.cpp2
-rw-r--r--clang-tools-extra/clangd/index/SymbolCollector.cpp2
-rw-r--r--clang-tools-extra/clangd/index/dex/Dex.cpp2
-rw-r--r--clang-tools-extra/clangd/index/dex/Iterator.cpp12
-rw-r--r--clang-tools-extra/clangd/index/dex/PostingList.cpp2
-rw-r--r--clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp6
-rw-r--r--clang-tools-extra/clangd/indexer/IndexerMain.cpp2
-rw-r--r--clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp2
-rw-r--r--clang-tools-extra/clangd/tool/ClangdMain.cpp4
-rw-r--r--clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp6
-rw-r--r--clang-tools-extra/clangd/unittests/ContextTests.cpp2
-rw-r--r--clang-tools-extra/clangd/unittests/FileIndexTests.cpp6
-rw-r--r--clang-tools-extra/clangd/unittests/GlobalCompilationDatabaseTests.cpp2
-rw-r--r--clang-tools-extra/clangd/unittests/IndexTests.cpp4
-rw-r--r--clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp2
-rw-r--r--clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp2
-rw-r--r--clang-tools-extra/clangd/unittests/TestTU.cpp2
-rw-r--r--clang-tools-extra/clangd/xpc/XPCTransport.cpp2
-rw-r--r--clang-tools-extra/modularize/CoverageChecker.cpp6
-rw-r--r--clang-tools-extra/modularize/Modularize.cpp4
-rw-r--r--clang-tools-extra/modularize/PreprocessorTracker.cpp2
-rw-r--r--clang-tools-extra/pp-trace/PPTrace.cpp4
-rw-r--r--clang-tools-extra/unittests/clang-doc/BitcodeTest.cpp52
-rw-r--r--clang-tools-extra/unittests/clang-doc/GeneratorTest.cpp10
-rw-r--r--clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp18
-rw-r--r--clang-tools-extra/unittests/clang-doc/MDGeneratorTest.cpp52
-rw-r--r--clang-tools-extra/unittests/clang-doc/MergeTest.cpp36
-rw-r--r--clang-tools-extra/unittests/clang-doc/YAMLGeneratorTest.cpp52
-rw-r--r--clang-tools-extra/unittests/clang-include-fixer/IncludeFixerTest.cpp4
-rw-r--r--clang-tools-extra/unittests/clang-move/ClangMoveTests.cpp2
-rw-r--r--clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h4
-rw-r--r--clang-tools-extra/unittests/clang-tidy/IncludeInserterTest.cpp2
99 files changed, 344 insertions, 344 deletions
diff --git a/clang-tools-extra/clang-change-namespace/ChangeNamespace.cpp b/clang-tools-extra/clang-change-namespace/ChangeNamespace.cpp
index eb7326399bd..e80ba52ce0f 100644
--- a/clang-tools-extra/clang-change-namespace/ChangeNamespace.cpp
+++ b/clang-tools-extra/clang-change-namespace/ChangeNamespace.cpp
@@ -109,7 +109,7 @@ getLexerStartingFromLoc(SourceLocation Loc, const SourceManager &SM,
const char *TokBegin = File.data() + LocInfo.second;
// Lex from the start of the given location.
- return llvm::make_unique<Lexer>(SM.getLocForStartOfFile(LocInfo.first),
+ return std::make_unique<Lexer>(SM.getLocForStartOfFile(LocInfo.first),
LangOpts, File.begin(), TokBegin, File.end());
}
diff --git a/clang-tools-extra/clang-doc/BitcodeReader.cpp b/clang-tools-extra/clang-doc/BitcodeReader.cpp
index 1d8eea0aade..70048405352 100644
--- a/clang-tools-extra/clang-doc/BitcodeReader.cpp
+++ b/clang-tools-extra/clang-doc/BitcodeReader.cpp
@@ -329,7 +329,7 @@ template <> llvm::Expected<CommentInfo *> getCommentInfo(EnumInfo *I) {
}
template <> llvm::Expected<CommentInfo *> getCommentInfo(CommentInfo *I) {
- I->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ I->Children.emplace_back(std::make_unique<CommentInfo>());
return I->Children.back().get();
}
@@ -690,7 +690,7 @@ llvm::Error ClangDocBitcodeReader::readBlockInfoBlock() {
template <typename T>
llvm::Expected<std::unique_ptr<Info>>
ClangDocBitcodeReader::createInfo(unsigned ID) {
- std::unique_ptr<Info> I = llvm::make_unique<T>();
+ std::unique_ptr<Info> I = std::make_unique<T>();
if (auto Err = readBlock(ID, static_cast<T *>(I.get())))
return std::move(Err);
return std::unique_ptr<Info>{std::move(I)};
diff --git a/clang-tools-extra/clang-doc/ClangDoc.cpp b/clang-tools-extra/clang-doc/ClangDoc.cpp
index ec32f012411..261139bc375 100644
--- a/clang-tools-extra/clang-doc/ClangDoc.cpp
+++ b/clang-tools-extra/clang-doc/ClangDoc.cpp
@@ -43,7 +43,7 @@ clang::FrontendAction *MapperActionFactory::create() {
std::unique_ptr<clang::ASTConsumer>
CreateASTConsumer(clang::CompilerInstance &Compiler,
llvm::StringRef InFile) override {
- return llvm::make_unique<MapASTVisitor>(&Compiler.getASTContext(), CDCtx);
+ return std::make_unique<MapASTVisitor>(&Compiler.getASTContext(), CDCtx);
}
private:
@@ -54,7 +54,7 @@ clang::FrontendAction *MapperActionFactory::create() {
std::unique_ptr<tooling::FrontendActionFactory>
newMapperActionFactory(ClangDocContext CDCtx) {
- return llvm::make_unique<MapperActionFactory>(CDCtx);
+ return std::make_unique<MapperActionFactory>(CDCtx);
}
} // namespace doc
diff --git a/clang-tools-extra/clang-doc/HTMLGenerator.cpp b/clang-tools-extra/clang-doc/HTMLGenerator.cpp
index b85232c9906..845a55b35e0 100644
--- a/clang-tools-extra/clang-doc/HTMLGenerator.cpp
+++ b/clang-tools-extra/clang-doc/HTMLGenerator.cpp
@@ -79,7 +79,7 @@ struct TextNode : public HTMLNode {
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<TextNode>(Text.str()));
+ Children.emplace_back(std::make_unique<TextNode>(Text.str()));
}
HTMLTag Tag; // Name of HTML Tag (p, div, h1)
@@ -254,7 +254,7 @@ static std::vector<std::unique_ptr<TagNode>>
genStylesheetsHTML(StringRef InfoPath, const ClangDocContext &CDCtx) {
std::vector<std::unique_ptr<TagNode>> Out;
for (const auto &FilePath : CDCtx.UserStylesheets) {
- auto LinkNode = llvm::make_unique<TagNode>(HTMLTag::TAG_LINK);
+ auto LinkNode = std::make_unique<TagNode>(HTMLTag::TAG_LINK);
LinkNode->Attributes.try_emplace("rel", "stylesheet");
SmallString<128> StylesheetPath = computeRelativePath("", InfoPath);
llvm::sys::path::append(StylesheetPath,
@@ -271,7 +271,7 @@ static std::vector<std::unique_ptr<TagNode>>
genJsScriptsHTML(StringRef InfoPath, const ClangDocContext &CDCtx) {
std::vector<std::unique_ptr<TagNode>> Out;
for (const auto &FilePath : CDCtx.JsScripts) {
- auto ScriptNode = llvm::make_unique<TagNode>(HTMLTag::TAG_SCRIPT);
+ auto ScriptNode = std::make_unique<TagNode>(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 @@ genJsScriptsHTML(StringRef InfoPath, const ClangDocContext &CDCtx) {
}
static std::unique_ptr<TagNode> genLink(const Twine &Text, const Twine &Link) {
- auto LinkNode = llvm::make_unique<TagNode>(HTMLTag::TAG_A, Text);
+ auto LinkNode = std::make_unique<TagNode>(HTMLTag::TAG_A, Text);
LinkNode->Attributes.try_emplace("href", Link.str());
return LinkNode;
}
@@ -293,7 +293,7 @@ genReference(const Reference &Type, StringRef CurrentDirectory,
llvm::Optional<StringRef> JumpToSection = None) {
if (Type.Path.empty() && !Type.IsInGlobalNamespace) {
if (!JumpToSection)
- return llvm::make_unique<TextNode>(Type.Name);
+ return std::make_unique<TextNode>(Type.Name);
else
return genLink(Type.Name, "#" + JumpToSection.getValue());
}
@@ -313,7 +313,7 @@ genReferenceList(const llvm::SmallVectorImpl<Reference> &Refs,
std::vector<std::unique_ptr<HTMLNode>> Out;
for (const auto &R : Refs) {
if (&R != Refs.begin())
- Out.emplace_back(llvm::make_unique<TextNode>(", "));
+ Out.emplace_back(std::make_unique<TextNode>(", "));
Out.emplace_back(genReference(R, CurrentDirectory));
}
return Out;
@@ -332,9 +332,9 @@ genEnumsBlock(const std::vector<EnumInfo> &Enums,
return {};
std::vector<std::unique_ptr<TagNode>> Out;
- Out.emplace_back(llvm::make_unique<TagNode>(HTMLTag::TAG_H2, "Enums"));
+ Out.emplace_back(std::make_unique<TagNode>(HTMLTag::TAG_H2, "Enums"));
Out.back()->Attributes.try_emplace("id", "Enums");
- Out.emplace_back(llvm::make_unique<TagNode>(HTMLTag::TAG_DIV));
+ Out.emplace_back(std::make_unique<TagNode>(HTMLTag::TAG_DIV));
auto &DivBody = Out.back();
for (const auto &E : Enums) {
std::vector<std::unique_ptr<TagNode>> Nodes = genHTML(E, CDCtx);
@@ -348,9 +348,9 @@ genEnumMembersBlock(const llvm::SmallVector<SmallString<16>, 4> &Members) {
if (Members.empty())
return nullptr;
- auto List = llvm::make_unique<TagNode>(HTMLTag::TAG_UL);
+ auto List = std::make_unique<TagNode>(HTMLTag::TAG_UL);
for (const auto &M : Members)
- List->Children.emplace_back(llvm::make_unique<TagNode>(HTMLTag::TAG_LI, M));
+ List->Children.emplace_back(std::make_unique<TagNode>(HTMLTag::TAG_LI, M));
return List;
}
@@ -361,9 +361,9 @@ genFunctionsBlock(const std::vector<FunctionInfo> &Functions,
return {};
std::vector<std::unique_ptr<TagNode>> Out;
- Out.emplace_back(llvm::make_unique<TagNode>(HTMLTag::TAG_H2, "Functions"));
+ Out.emplace_back(std::make_unique<TagNode>(HTMLTag::TAG_H2, "Functions"));
Out.back()->Attributes.try_emplace("id", "Functions");
- Out.emplace_back(llvm::make_unique<TagNode>(HTMLTag::TAG_DIV));
+ Out.emplace_back(std::make_unique<TagNode>(HTMLTag::TAG_DIV));
auto &DivBody = Out.back();
for (const auto &F : Functions) {
std::vector<std::unique_ptr<TagNode>> Nodes =
@@ -380,18 +380,18 @@ genRecordMembersBlock(const llvm::SmallVector<MemberTypeInfo, 4> &Members,
return {};
std::vector<std::unique_ptr<TagNode>> Out;
- Out.emplace_back(llvm::make_unique<TagNode>(HTMLTag::TAG_H2, "Members"));
+ Out.emplace_back(std::make_unique<TagNode>(HTMLTag::TAG_H2, "Members"));
Out.back()->Attributes.try_emplace("id", "Members");
- Out.emplace_back(llvm::make_unique<TagNode>(HTMLTag::TAG_UL));
+ Out.emplace_back(std::make_unique<TagNode>(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<TagNode>(HTMLTag::TAG_LI);
- LIBody->Children.emplace_back(llvm::make_unique<TextNode>(Access));
+ auto LIBody = std::make_unique<TagNode>(HTMLTag::TAG_LI);
+ LIBody->Children.emplace_back(std::make_unique<TextNode>(Access));
LIBody->Children.emplace_back(genReference(M.Type, ParentInfoDir));
- LIBody->Children.emplace_back(llvm::make_unique<TextNode>(" " + M.Name));
+ LIBody->Children.emplace_back(std::make_unique<TextNode>(" " + M.Name));
ULBody->Children.emplace_back(std::move(LIBody));
}
return Out;
@@ -404,12 +404,12 @@ genReferencesBlock(const std::vector<Reference> &References,
return {};
std::vector<std::unique_ptr<TagNode>> Out;
- Out.emplace_back(llvm::make_unique<TagNode>(HTMLTag::TAG_H2, Title));
+ Out.emplace_back(std::make_unique<TagNode>(HTMLTag::TAG_H2, Title));
Out.back()->Attributes.try_emplace("id", Title);
- Out.emplace_back(llvm::make_unique<TagNode>(HTMLTag::TAG_UL));
+ Out.emplace_back(std::make_unique<TagNode>(HTMLTag::TAG_UL));
auto &ULBody = Out.back();
for (const auto &R : References) {
- auto LiNode = llvm::make_unique<TagNode>(HTMLTag::TAG_LI);
+ auto LiNode = std::make_unique<TagNode>(HTMLTag::TAG_LI);
LiNode->Children.emplace_back(genReference(R, ParentPath));
ULBody->Children.emplace_back(std::move(LiNode));
}
@@ -420,22 +420,22 @@ static std::unique_ptr<TagNode>
writeFileDefinition(const Location &L,
llvm::Optional<StringRef> RepositoryUrl = None) {
if (!L.IsFileInRootDir || !RepositoryUrl)
- return llvm::make_unique<TagNode>(
+ return std::make_unique<TagNode>(
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<TagNode>(HTMLTag::TAG_P);
- Node->Children.emplace_back(llvm::make_unique<TextNode>("Defined at line "));
+ auto Node = std::make_unique<TagNode>(HTMLTag::TAG_P);
+ Node->Children.emplace_back(std::make_unique<TextNode>("Defined at line "));
auto LocNumberNode =
- llvm::make_unique<TagNode>(HTMLTag::TAG_A, std::to_string(L.LineNumber));
+ std::make_unique<TagNode>(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<TextNode>(" of file "));
- auto LocFileNode = llvm::make_unique<TagNode>(
+ Node->Children.emplace_back(std::make_unique<TextNode>(" of file "));
+ auto LocFileNode = std::make_unique<TagNode>(
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 @@ static std::vector<std::unique_ptr<TagNode>>
genCommonFileNodes(StringRef Title, StringRef InfoPath,
const ClangDocContext &CDCtx) {
std::vector<std::unique_ptr<TagNode>> Out;
- auto MetaNode = llvm::make_unique<TagNode>(HTMLTag::TAG_META);
+ auto MetaNode = std::make_unique<TagNode>(HTMLTag::TAG_META);
MetaNode->Attributes.try_emplace("charset", "utf-8");
Out.emplace_back(std::move(MetaNode));
- Out.emplace_back(llvm::make_unique<TagNode>(HTMLTag::TAG_TITLE, Title));
+ Out.emplace_back(std::make_unique<TagNode>(HTMLTag::TAG_TITLE, Title));
std::vector<std::unique_ptr<TagNode>> StylesheetsNodes =
genStylesheetsHTML(InfoPath, CDCtx);
AppendVector(std::move(StylesheetsNodes), Out);
@@ -457,7 +457,7 @@ genCommonFileNodes(StringRef Title, StringRef InfoPath,
genJsScriptsHTML(InfoPath, CDCtx);
AppendVector(std::move(JsNodes), Out);
// An empty <div> is generated but the index will be then rendered here
- auto IndexNode = llvm::make_unique<TagNode>(HTMLTag::TAG_DIV);
+ auto IndexNode = std::make_unique<TagNode>(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 @@ static std::vector<std::unique_ptr<TagNode>> genHTML(const Index &Index,
StringRef InfoPath) {
std::vector<std::unique_ptr<TagNode>> Out;
if (!Index.Name.empty()) {
- Out.emplace_back(llvm::make_unique<TagNode>(HTMLTag::TAG_SPAN));
+ Out.emplace_back(std::make_unique<TagNode>(HTMLTag::TAG_SPAN));
auto &SpanBody = Out.back();
if (!Index.JumpToSection)
SpanBody->Children.emplace_back(genReference(Index, InfoPath));
@@ -488,10 +488,10 @@ static std::vector<std::unique_ptr<TagNode>> genHTML(const Index &Index,
}
if (Index.Children.empty())
return Out;
- Out.emplace_back(llvm::make_unique<TagNode>(HTMLTag::TAG_UL));
+ Out.emplace_back(std::make_unique<TagNode>(HTMLTag::TAG_UL));
const auto &UlBody = Out.back();
for (const auto &C : Index.Children) {
- auto LiBody = llvm::make_unique<TagNode>(HTMLTag::TAG_LI);
+ auto LiBody = std::make_unique<TagNode>(HTMLTag::TAG_LI);
std::vector<std::unique_ptr<TagNode>> Nodes = genHTML(C, InfoPath);
AppendVector(std::move(Nodes), LiBody->Children);
UlBody->Children.emplace_back(std::move(LiBody));
@@ -501,7 +501,7 @@ static std::vector<std::unique_ptr<TagNode>> genHTML(const Index &Index,
static std::unique_ptr<HTMLNode> genHTML(const CommentInfo &I) {
if (I.Kind == "FullComment") {
- auto FullComment = llvm::make_unique<TagNode>(HTMLTag::TAG_DIV);
+ auto FullComment = std::make_unique<TagNode>(HTMLTag::TAG_DIV);
for (const auto &Child : I.Children) {
std::unique_ptr<HTMLNode> Node = genHTML(*Child);
if (Node)
@@ -509,7 +509,7 @@ static std::unique_ptr<HTMLNode> genHTML(const CommentInfo &I) {
}
return std::move(FullComment);
} else if (I.Kind == "ParagraphComment") {
- auto ParagraphComment = llvm::make_unique<TagNode>(HTMLTag::TAG_P);
+ auto ParagraphComment = std::make_unique<TagNode>(HTMLTag::TAG_P);
for (const auto &Child : I.Children) {
std::unique_ptr<HTMLNode> Node = genHTML(*Child);
if (Node)
@@ -521,13 +521,13 @@ static std::unique_ptr<HTMLNode> genHTML(const CommentInfo &I) {
} else if (I.Kind == "TextComment") {
if (I.Text == "")
return nullptr;
- return llvm::make_unique<TextNode>(I.Text);
+ return std::make_unique<TextNode>(I.Text);
}
return nullptr;
}
static std::unique_ptr<TagNode> genHTML(const std::vector<CommentInfo> &C) {
- auto CommentBlock = llvm::make_unique<TagNode>(HTMLTag::TAG_DIV);
+ auto CommentBlock = std::make_unique<TagNode>(HTMLTag::TAG_DIV);
for (const auto &Child : C) {
if (std::unique_ptr<HTMLNode> Node = genHTML(Child))
CommentBlock->Children.emplace_back(std::move(Node));
@@ -545,7 +545,7 @@ genHTML(const EnumInfo &I, const ClangDocContext &CDCtx) {
EnumType = "enum ";
Out.emplace_back(
- llvm::make_unique<TagNode>(HTMLTag::TAG_H3, EnumType + I.Name));
+ std::make_unique<TagNode>(HTMLTag::TAG_H3, EnumType + I.Name));
Out.back()->Attributes.try_emplace("id",
llvm::toHex(llvm::toStringRef(I.USR)));
@@ -572,35 +572,35 @@ static std::vector<std::unique_ptr<TagNode>>
genHTML(const FunctionInfo &I, const ClangDocContext &CDCtx,
StringRef ParentInfoDir) {
std::vector<std::unique_ptr<TagNode>> Out;
- Out.emplace_back(llvm::make_unique<TagNode>(HTMLTag::TAG_H3, I.Name));
+ Out.emplace_back(std::make_unique<TagNode>(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<TagNode>(HTMLTag::TAG_P));
+ Out.emplace_back(std::make_unique<TagNode>(HTMLTag::TAG_P));
auto &FunctionHeader = Out.back();
std::string Access = getAccess(I.Access);
if (Access != "")
FunctionHeader->Children.emplace_back(
- llvm::make_unique<TextNode>(Access + " "));
+ std::make_unique<TextNode>(Access + " "));
if (I.ReturnType.Type.Name != "") {
FunctionHeader->Children.emplace_back(
genReference(I.ReturnType.Type, ParentInfoDir));
- FunctionHeader->Children.emplace_back(llvm::make_unique<TextNode>(" "));
+ FunctionHeader->Children.emplace_back(std::make_unique<TextNode>(" "));
}
FunctionHeader->Children.emplace_back(
- llvm::make_unique<TextNode>(I.Name + "("));
+ std::make_unique<TextNode>(I.Name + "("));
for (const auto &P : I.Params) {
if (&P != I.Params.begin())
- FunctionHeader->Children.emplace_back(llvm::make_unique<TextNode>(", "));
+ FunctionHeader->Children.emplace_back(std::make_unique<TextNode>(", "));
FunctionHeader->Children.emplace_back(genReference(P.Type, ParentInfoDir));
FunctionHeader->Children.emplace_back(
- llvm::make_unique<TextNode>(" " + P.Name));
+ std::make_unique<TextNode>(" " + P.Name));
}
- FunctionHeader->Children.emplace_back(llvm::make_unique<TextNode>(")"));
+ FunctionHeader->Children.emplace_back(std::make_unique<TextNode>(")"));
if (I.DefLoc) {
if (!CDCtx.RepositoryUrl)
@@ -626,7 +626,7 @@ genHTML(const NamespaceInfo &I, Index &InfoIndex, const ClangDocContext &CDCtx,
else
InfoTitle = ("namespace " + I.Name).str();
- Out.emplace_back(llvm::make_unique<TagNode>(HTMLTag::TAG_H1, InfoTitle));
+ Out.emplace_back(std::make_unique<TagNode>(HTMLTag::TAG_H1, InfoTitle));
std::string Description;
if (!I.Description.empty())
@@ -664,7 +664,7 @@ genHTML(const RecordInfo &I, Index &InfoIndex, const ClangDocContext &CDCtx,
std::string &InfoTitle) {
std::vector<std::unique_ptr<TagNode>> Out;
InfoTitle = (getTagType(I.TagType) + " " + I.Name).str();
- Out.emplace_back(llvm::make_unique<TagNode>(HTMLTag::TAG_H1, InfoTitle));
+ Out.emplace_back(std::make_unique<TagNode>(HTMLTag::TAG_H1, InfoTitle));
if (I.DefLoc) {
if (!CDCtx.RepositoryUrl)
@@ -683,16 +683,16 @@ genHTML(const RecordInfo &I, Index &InfoIndex, const ClangDocContext &CDCtx,
std::vector<std::unique_ptr<HTMLNode>> VParents =
genReferenceList(I.VirtualParents, I.Path);
if (!Parents.empty() || !VParents.empty()) {
- Out.emplace_back(llvm::make_unique<TagNode>(HTMLTag::TAG_P));
+ Out.emplace_back(std::make_unique<TagNode>(HTMLTag::TAG_P));
auto &PBody = Out.back();
- PBody->Children.emplace_back(llvm::make_unique<TextNode>("Inherits from "));
+ PBody->Children.emplace_back(std::make_unique<TextNode>("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<TextNode>(", "));
+ PBody->Children.emplace_back(std::make_unique<TextNode>(", "));
AppendVector(std::move(VParents), PBody->Children);
}
}
@@ -740,7 +740,7 @@ llvm::Error HTMLGenerator::generateDocForInfo(Info *I, llvm::raw_ostream &OS,
const ClangDocContext &CDCtx) {
HTMLFile F;
std::string InfoTitle;
- auto MainContentNode = llvm::make_unique<TagNode>(HTMLTag::TAG_DIV);
+ auto MainContentNode = std::make_unique<TagNode>(HTMLTag::TAG_DIV);
Index InfoIndex;
switch (I->IT) {
case InfoType::IT_namespace: {
diff --git a/clang-tools-extra/clang-doc/Representation.cpp b/clang-tools-extra/clang-doc/Representation.cpp
index aee9dc5a6c5..18cec16cff2 100644
--- a/clang-tools-extra/clang-doc/Representation.cpp
+++ b/clang-tools-extra/clang-doc/Representation.cpp
@@ -36,7 +36,7 @@ reduce(std::vector<std::unique_ptr<Info>> &Values) {
if (Values.empty())
return llvm::make_error<llvm::StringError>(" No values to reduce.\n",
llvm::inconvertibleErrorCode());
- std::unique_ptr<Info> Merged = llvm::make_unique<T>(Values[0]->USR);
+ std::unique_ptr<Info> Merged = std::make_unique<T>(Values[0]->USR);
T *Tmp = static_cast<T *>(Merged.get());
for (auto &I : Values)
Tmp->merge(std::move(*static_cast<T *>(I.get())));
diff --git a/clang-tools-extra/clang-doc/Serialize.cpp b/clang-tools-extra/clang-doc/Serialize.cpp
index 78f19991560..cc937b678fb 100644
--- a/clang-tools-extra/clang-doc/Serialize.cpp
+++ b/clang-tools-extra/clang-doc/Serialize.cpp
@@ -90,7 +90,7 @@ void ClangDocCommentVisitor::parseComment(const comments::Comment *C) {
ConstCommentVisitor<ClangDocCommentVisitor>::visit(C);
for (comments::Comment *Child :
llvm::make_range(C->child_begin(), C->child_end())) {
- CurrentCI.Children.emplace_back(llvm::make_unique<CommentInfo>());
+ CurrentCI.Children.emplace_back(std::make_unique<CommentInfo>());
ClangDocCommentVisitor Visitor(*CurrentCI.Children.back());
Visitor.parseComment(Child);
}
@@ -379,7 +379,7 @@ static void populateFunctionInfo(FunctionInfo &I, const FunctionDecl *D,
std::pair<std::unique_ptr<Info>, std::unique_ptr<Info>>
emitInfo(const NamespaceDecl *D, const FullComment *FC, int LineNumber,
llvm::StringRef File, bool IsFileInRootDir, bool PublicOnly) {
- auto I = llvm::make_unique<NamespaceInfo>();
+ auto I = std::make_unique<NamespaceInfo>();
bool IsInAnonymousNamespace = false;
populateInfo(*I, D, FC, IsInAnonymousNamespace);
if (PublicOnly && ((IsInAnonymousNamespace || D->isAnonymousNamespace()) ||
@@ -392,7 +392,7 @@ emitInfo(const NamespaceDecl *D, const FullComment *FC, int LineNumber,
if (I->Namespace.empty() && I->USR == SymbolID())
return {std::unique_ptr<Info>{std::move(I)}, nullptr};
- auto ParentI = llvm::make_unique<NamespaceInfo>();
+ auto ParentI = std::make_unique<NamespaceInfo>();
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 @@ emitInfo(const NamespaceDecl *D, const FullComment *FC, int LineNumber,
std::pair<std::unique_ptr<Info>, std::unique_ptr<Info>>
emitInfo(const RecordDecl *D, const FullComment *FC, int LineNumber,
llvm::StringRef File, bool IsFileInRootDir, bool PublicOnly) {
- auto I = llvm::make_unique<RecordInfo>();
+ auto I = std::make_unique<RecordInfo>();
bool IsInAnonymousNamespace = false;
populateSymbolInfo(*I, D, FC, LineNumber, File, IsFileInRootDir,
IsInAnonymousNamespace);
@@ -425,7 +425,7 @@ emitInfo(const RecordDecl *D, const FullComment *FC, int LineNumber,
I->Path = getInfoRelativePath(I->Namespace);
if (I->Namespace.empty()) {
- auto ParentI = llvm::make_unique<NamespaceInfo>();
+ auto ParentI = std::make_unique<NamespaceInfo>();
ParentI->USR = SymbolID();
ParentI->ChildRecords.emplace_back(I->USR, I->Name, InfoType::IT_record,
getInfoRelativePath(I->Namespace));
@@ -436,7 +436,7 @@ emitInfo(const RecordDecl *D, const FullComment *FC, int LineNumber,
switch (I->Namespace[0].RefType) {
case InfoType::IT_namespace: {
- auto ParentI = llvm::make_unique<NamespaceInfo>();
+ auto ParentI = std::make_unique<NamespaceInfo>();
ParentI->USR = I->Namespace[0].USR;
ParentI->ChildRecords.emplace_back(I->USR, I->Name, InfoType::IT_record,
getInfoRelativePath(I->Namespace));
@@ -444,7 +444,7 @@ emitInfo(const RecordDecl *D, const FullComment *FC, int LineNumber,
std::unique_ptr<Info>{std::move(ParentI)}};
}
case InfoType::IT_record: {
- auto ParentI = llvm::make_unique<RecordInfo>();
+ auto ParentI = std::make_unique<RecordInfo>();
ParentI->USR = I->Namespace[0].USR;
ParentI->ChildRecords.emplace_back(I->USR, I->Name, InfoType::IT_record,
getInfoRelativePath(I->Namespace));
@@ -470,7 +470,7 @@ emitInfo(const FunctionDecl *D, const FullComment *FC, int LineNumber,
Func.Access = clang::AccessSpecifier::AS_none;
// Wrap in enclosing scope
- auto ParentI = llvm::make_unique<NamespaceInfo>();
+ auto ParentI = std::make_unique<NamespaceInfo>();
if (!Func.Namespace.empty())
ParentI->USR = Func.Namespace[0].USR;
else
@@ -508,7 +508,7 @@ emitInfo(const CXXMethodDecl *D, const FullComment *FC, int LineNumber,
Func.Access = D->getAccess();
// Wrap in enclosing scope
- auto ParentI = llvm::make_unique<RecordInfo>();
+ auto ParentI = std::make_unique<RecordInfo>();
ParentI->USR = ParentUSR;
if (Func.Namespace.empty())
ParentI->Path = getInfoRelativePath(ParentI->Namespace);
@@ -533,7 +533,7 @@ emitInfo(const EnumDecl *D, const FullComment *FC, int LineNumber,
// Put in global namespace
if (Enum.Namespace.empty()) {
- auto ParentI = llvm::make_unique<NamespaceInfo>();
+ auto ParentI = std::make_unique<NamespaceInfo>();
ParentI->USR = SymbolID();
ParentI->ChildEnums.emplace_back(std::move(Enum));
ParentI->Path = getInfoRelativePath(ParentI->Namespace);
@@ -545,7 +545,7 @@ emitInfo(const EnumDecl *D, const FullComment *FC, int LineNumber,
// Wrap in enclosing scope
switch (Enum.Namespace[0].RefType) {
case InfoType::IT_namespace: {
- auto ParentI = llvm::make_unique<NamespaceInfo>();
+ auto ParentI = std::make_unique<NamespaceInfo>();
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 @@ emitInfo(const EnumDecl *D, const FullComment *FC, int LineNumber,
return {nullptr, std::unique_ptr<Info>{std::move(ParentI)}};
}
case InfoType::IT_record: {
- auto ParentI = llvm::make_unique<RecordInfo>();
+ auto ParentI = std::make_unique<RecordInfo>();
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
diff --git a/clang-tools-extra/clang-include-fixer/FuzzySymbolIndex.cpp b/clang-tools-extra/clang-include-fixer/FuzzySymbolIndex.cpp
index 099d7389cc7..58a320eea31 100644
--- a/clang-tools-extra/clang-include-fixer/FuzzySymbolIndex.cpp
+++ b/clang-tools-extra/clang-include-fixer/FuzzySymbolIndex.cpp
@@ -134,7 +134,7 @@ FuzzySymbolIndex::createFromYAML(StringRef FilePath) {
auto Buffer = llvm::MemoryBuffer::getFile(FilePath);
if (!Buffer)
return llvm::errorCodeToError(Buffer.getError());
- return llvm::make_unique<MemSymbolIndex>(
+ return std::make_unique<MemSymbolIndex>(
find_all_symbols::ReadSymbolInfosFromYAML(Buffer.get()->getBuffer()));
}
diff --git a/clang-tools-extra/clang-include-fixer/IncludeFixer.cpp b/clang-tools-extra/clang-include-fixer/IncludeFixer.cpp
index c07add2c760..374fcf2af79 100644
--- a/clang-tools-extra/clang-include-fixer/IncludeFixer.cpp
+++ b/clang-tools-extra/clang-include-fixer/IncludeFixer.cpp
@@ -34,7 +34,7 @@ public:
CreateASTConsumer(clang::CompilerInstance &Compiler,
StringRef InFile) override {
SemaSource.setFilePath(InFile);
- return llvm::make_unique<clang::ASTConsumer>();
+ return std::make_unique<clang::ASTConsumer>();
}
void ExecuteAction() override {
@@ -104,7 +104,7 @@ bool IncludeFixerActionFactory::runInvocation(
// Run the parser, gather missing includes.
auto ScopedToolAction =
- llvm::make_unique<Action>(SymbolIndexMgr, MinimizeIncludePaths);
+ std::make_unique<Action>(SymbolIndexMgr, MinimizeIncludePaths);
Compiler.ExecuteAction(*ScopedToolAction);
Contexts.push_back(ScopedToolAction->getIncludeFixerContext(
diff --git a/clang-tools-extra/clang-include-fixer/find-all-symbols/FindAllSymbolsAction.cpp b/clang-tools-extra/clang-include-fixer/find-all-symbols/FindAllSymbolsAction.cpp
index 9f1d31dc38a..cb209edd8af 100644
--- a/clang-tools-extra/clang-include-fixer/find-all-symbols/FindAllSymbolsAction.cpp
+++ b/clang-tools-extra/clang-include-fixer/find-all-symbols/FindAllSymbolsAction.cpp
@@ -27,7 +27,7 @@ std::unique_ptr<ASTConsumer>
FindAllSymbolsAction::CreateASTConsumer(CompilerInstance &Compiler,
StringRef InFile) {
Compiler.getPreprocessor().addCommentHandler(&Handler);
- Compiler.getPreprocessor().addPPCallbacks(llvm::make_unique<FindAllMacros>(
+ Compiler.getPreprocessor().addPPCallbacks(std::make_unique<FindAllMacros>(
Reporter, &Compiler.getSourceManager(), &Collector));
return MatchFinder.newASTConsumer();
}
diff --git a/clang-tools-extra/clang-include-fixer/find-all-symbols/tool/FindAllSymbolsMain.cpp b/clang-tools-extra/clang-include-fixer/find-all-symbols/tool/FindAllSymbolsMain.cpp
index c025a67198b..8508721bb85 100644
--- a/clang-tools-extra/clang-include-fixer/find-all-symbols/tool/FindAllSymbolsMain.cpp
+++ b/clang-tools-extra/clang-include-fixer/find-all-symbols/tool/FindAllSymbolsMain.cpp
@@ -145,7 +145,7 @@ int main(int argc, const char **argv) {
clang::find_all_symbols::YamlReporter Reporter;
auto Factory =
- llvm::make_unique<clang::find_all_symbols::FindAllSymbolsActionFactory>(
+ std::make_unique<clang::find_all_symbols::FindAllSymbolsActionFactory>(
&Reporter, clang::find_all_symbols::getSTLPostfixHeaderMap());
return Tool.run(Factory.get());
}
diff --git a/clang-tools-extra/clang-include-fixer/plugin/IncludeFixerPlugin.cpp b/clang-tools-extra/clang-include-fixer/plugin/IncludeFixerPlugin.cpp
index bc9c497334c..3406a25ee35 100644
--- a/clang-tools-extra/clang-include-fixer/plugin/IncludeFixerPlugin.cpp
+++ b/clang-tools-extra/clang-include-fixer/plugin/IncludeFixerPlugin.cpp
@@ -41,7 +41,7 @@ public:
CI.setExternalSemaSource(SemaSource);
SemaSource->setFilePath(InFile);
SemaSource->setCompilerInstance(&CI);
- return llvm::make_unique<ASTConsumerManagerWrapper>(SymbolIndexMgr);
+ return std::make_unique<ASTConsumerManagerWrapper>(SymbolIndexMgr);
}
void ExecuteAction() override {} // Do nothing.
diff --git a/clang-tools-extra/clang-include-fixer/tool/ClangIncludeFixer.cpp b/clang-tools-extra/clang-include-fixer/tool/ClangIncludeFixer.cpp
index 15f6ed29d6d..50a0c49ba64 100644
--- a/clang-tools-extra/clang-include-fixer/tool/ClangIncludeFixer.cpp
+++ b/clang-tools-extra/clang-include-fixer/tool/ClangIncludeFixer.cpp
@@ -161,7 +161,7 @@ std::unique_ptr<include_fixer::SymbolIndexManager>
createSymbolIndexManager(StringRef FilePath) {
using find_all_symbols::SymbolInfo;
- auto SymbolIndexMgr = llvm::make_unique<include_fixer::SymbolIndexManager>();
+ auto SymbolIndexMgr = std::make_unique<include_fixer::SymbolIndexManager>();
switch (DatabaseFormat) {
case fixed: {
// Parse input and fill the database with it.
@@ -185,7 +185,7 @@ createSymbolIndexManager(StringRef FilePath) {
/*Used=*/0)});
}
SymbolIndexMgr->addSymbolIndex([=]() {
- return llvm::make_unique<include_fixer::InMemorySymbolIndex>(Symbols);
+ return std::make_unique<include_fixer::InMemorySymbolIndex>(Symbols);
});
break;
}
diff --git a/clang-tools-extra/clang-move/HelperDeclRefGraph.cpp b/clang-tools-extra/clang-move/HelperDeclRefGraph.cpp
index b47e7f4e19e..5495ae04458 100644
--- a/clang-tools-extra/clang-move/HelperDeclRefGraph.cpp
+++ b/clang-tools-extra/clang-move/HelperDeclRefGraph.cpp
@@ -59,7 +59,7 @@ CallGraphNode *HelperDeclRefGraph::getOrInsertNode(Decl *F) {
if (Node)
return Node.get();
- Node = llvm::make_unique<CallGraphNode>(F);
+ Node = std::make_unique<CallGraphNode>(F);
return Node.get();
}
diff --git a/clang-tools-extra/clang-move/Move.cpp b/clang-tools-extra/clang-move/Move.cpp
index e8438935c84..14052178fba 100644
--- a/clang-tools-extra/clang-move/Move.cpp
+++ b/clang-tools-extra/clang-move/Move.cpp
@@ -476,7 +476,7 @@ getUsedDecls(const HelperDeclRefGraph *RG,
std::unique_ptr<ASTConsumer>
ClangMoveAction::CreateASTConsumer(CompilerInstance &Compiler,
StringRef /*InFile*/) {
- Compiler.getPreprocessor().addPPCallbacks(llvm::make_unique<FindAllIncludes>(
+ Compiler.getPreprocessor().addPPCallbacks(std::make_unique<FindAllIncludes>(
&Compiler.getSourceManager(), &MoveTool));
return MatchFinder.newASTConsumer();
}
@@ -610,7 +610,7 @@ void ClangMoveTool::registerMatchers(ast_matchers::MatchFinder *Finder) {
// Matchers for old files, including old.h/old.cc
//============================================================================
// Create a MatchCallback for class declarations.
- MatchCallbacks.push_back(llvm::make_unique<ClassDeclarationMatch>(this));
+ MatchCallbacks.push_back(std::make_unique<ClassDeclarationMatch>(this));
// Match moved class declarations.
auto MovedClass = cxxRecordDecl(InOldFiles, *HasAnySymbolNames,
isDefinition(), TopLevelDecl)
@@ -629,19 +629,19 @@ void ClangMoveTool::registerMatchers(ast_matchers::MatchFinder *Finder) {
.bind("class_static_var_decl"),
MatchCallbacks.back().get());
- MatchCallbacks.push_back(llvm::make_unique<FunctionDeclarationMatch>(this));
+ MatchCallbacks.push_back(std::make_unique<FunctionDeclarationMatch>(this));
Finder->addMatcher(functionDecl(InOldFiles, *HasAnySymbolNames, TopLevelDecl)
.bind("function"),
MatchCallbacks.back().get());
- MatchCallbacks.push_back(llvm::make_unique<VarDeclarationMatch>(this));
+ MatchCallbacks.push_back(std::make_unique<VarDeclarationMatch>(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<EnumDeclarationMatch>(this));
+ MatchCallbacks.push_back(std::make_unique<EnumDeclarationMatch>(this));
Finder->addMatcher(
enumDecl(InOldHeader, *HasAnySymbolNames, isDefinition(), TopLevelDecl)
.bind("enum"),
@@ -650,7 +650,7 @@ void ClangMoveTool::registerMatchers(ast_matchers::MatchFinder *Finder) {
// 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<TypeAliasMatch>(this));
+ MatchCallbacks.push_back(std::make_unique<TypeAliasMatch>(this));
Finder->addMatcher(namedDecl(anyOf(typedefDecl().bind("typedef"),
typeAliasDecl().bind("type_alias")),
InOldHeader, *HasAnySymbolNames, TopLevelDecl),
diff --git a/clang-tools-extra/clang-reorder-fields/ReorderFieldsAction.cpp b/clang-tools-extra/clang-reorder-fields/ReorderFieldsAction.cpp
index c11234a0e56..3f9b1b9a4fb 100644
--- a/clang-tools-extra/clang-reorder-fields/ReorderFieldsAction.cpp
+++ b/clang-tools-extra/clang-reorder-fields/ReorderFieldsAction.cpp
@@ -302,7 +302,7 @@ public:
} // end anonymous namespace
std::unique_ptr<ASTConsumer> ReorderFieldsAction::newASTConsumer() {
- return llvm::make_unique<ReorderingConsumer>(RecordName, DesiredFieldsOrder,
+ return std::make_unique<ReorderingConsumer>(RecordName, DesiredFieldsOrder,
Replacements);
}
diff --git a/clang-tools-extra/clang-tidy/ClangTidy.cpp b/clang-tools-extra/clang-tidy/ClangTidy.cpp
index f0ef809338b..bfa043bf95a 100644
--- a/clang-tools-extra/clang-tidy/ClangTidy.cpp
+++ b/clang-tools-extra/clang-tidy/ClangTidy.cpp
@@ -390,7 +390,7 @@ ClangTidyASTConsumerFactory::CreateASTConsumer(
std::unique_ptr<ClangTidyProfiling> Profiling;
if (Context.getEnableProfiling()) {
- Profiling = llvm::make_unique<ClangTidyProfiling>(
+ Profiling = std::make_unique<ClangTidyProfiling>(
Context.getProfileStorageParams());
FinderOptions.CheckProfiling.emplace(Profiling->Records);
}
@@ -402,7 +402,7 @@ ClangTidyASTConsumerFactory::CreateASTConsumer(
Preprocessor *ModuleExpanderPP = PP;
if (Context.getLangOpts().Modules && OverlayFS != nullptr) {
- auto ModuleExpander = llvm::make_unique<ExpandModularHeadersPPCallbacks>(
+ auto ModuleExpander = std::make_unique<ExpandModularHeadersPPCallbacks>(
&Compiler, OverlayFS);
ModuleExpanderPP = ModuleExpander->getPreprocessor();
PP->addPPCallbacks(std::move(ModuleExpander));
@@ -434,7 +434,7 @@ ClangTidyASTConsumerFactory::CreateASTConsumer(
Consumers.push_back(std::move(AnalysisConsumer));
}
#endif // CLANG_ENABLE_STATIC_ANALYZER
- return llvm::make_unique<ClangTidyASTConsumer>(
+ return std::make_unique<ClangTidyASTConsumer>(
std::move(Consumers), std::move(Profiling), std::move(Finder),
std::move(Checks));
}
@@ -469,7 +469,7 @@ std::vector<std::string>
getCheckNames(const ClangTidyOptions &Options,
bool AllowEnablingAnalyzerAlphaCheckers) {
clang::tidy::ClangTidyContext Context(
- llvm::make_unique<DefaultOptionsProvider>(ClangTidyGlobalOptions(),
+ std::make_unique<DefaultOptionsProvider>(ClangTidyGlobalOptions(),
Options),
AllowEnablingAnalyzerAlphaCheckers);
ClangTidyASTConsumerFactory Factory(Context);
@@ -480,7 +480,7 @@ ClangTidyOptions::OptionMap
getCheckOptions(const ClangTidyOptions &Options,
bool AllowEnablingAnalyzerAlphaCheckers) {
clang::tidy::ClangTidyContext Context(
- llvm::make_unique<DefaultOptionsProvider>(ClangTidyGlobalOptions(),
+ std::make_unique<DefaultOptionsProvider>(ClangTidyGlobalOptions(),
Options),
AllowEnablingAnalyzerAlphaCheckers);
ClangTidyASTConsumerFactory Factory(Context);
diff --git a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
index 0a85d8eb94e..1074af97786 100644
--- a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
+++ b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
@@ -213,9 +213,9 @@ void ClangTidyContext::setSourceManager(SourceManager *SourceMgr) {
void ClangTidyContext::setCurrentFile(StringRef File) {
CurrentFile = File;
CurrentOptions = getOptionsForFile(CurrentFile);
- CheckFilter = llvm::make_unique<CachedGlobList>(*getOptions().Checks);
+ CheckFilter = std::make_unique<CachedGlobList>(*getOptions().Checks);
WarningAsErrorFilter =
- llvm::make_unique<CachedGlobList>(*getOptions().WarningsAsErrors);
+ std::make_unique<CachedGlobList>(*getOptions().WarningsAsErrors);
}
void ClangTidyContext::setASTContext(ASTContext *Context) {
@@ -604,7 +604,7 @@ void ClangTidyDiagnosticConsumer::checkFilters(SourceLocation Location,
llvm::Regex *ClangTidyDiagnosticConsumer::getHeaderFilter() {
if (!HeaderFilter)
HeaderFilter =
- llvm::make_unique<llvm::Regex>(*Context.getOptions().HeaderFilterRegex);
+ std::make_unique<llvm::Regex>(*Context.getOptions().HeaderFilterRegex);
return HeaderFilter.get();
}
diff --git a/clang-tools-extra/clang-tidy/ClangTidyOptions.h b/clang-tools-extra/clang-tidy/ClangTidyOptions.h
index 87c7cf599cd..0ce61e80fa9 100644
--- a/clang-tools-extra/clang-tidy/ClangTidyOptions.h
+++ b/clang-tools-extra/clang-tidy/ClangTidyOptions.h
@@ -199,7 +199,7 @@ public:
/// FileOptionsProvider::ConfigFileHandlers ConfigHandlers;
/// ConfigHandlers.emplace_back(".my-tidy-config", parseMyConfigFormat);
/// ConfigHandlers.emplace_back(".clang-tidy", parseConfiguration);
- /// return llvm::make_unique<FileOptionsProvider>(
+ /// return std::make_unique<FileOptionsProvider>(
/// GlobalOptions, DefaultOptions, OverrideOptions, ConfigHandlers);
/// \endcode
///
diff --git a/clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.cpp b/clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.cpp
index 08037c7f52f..8da3c7ed721 100644
--- a/clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.cpp
+++ b/clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.cpp
@@ -54,7 +54,7 @@ private:
ExpandModularHeadersPPCallbacks::ExpandModularHeadersPPCallbacks(
CompilerInstance *CI,
IntrusiveRefCntPtr<llvm::vfs::OverlayFileSystem> OverlayFS)
- : Recorder(llvm::make_unique<FileRecorder>()), Compiler(*CI),
+ : Recorder(std::make_unique<FileRecorder>()), Compiler(*CI),
InMemoryFs(new llvm::vfs::InMemoryFileSystem),
Sources(Compiler.getSourceManager()),
// Forward the new diagnostics to the original DiagnosticConsumer.
@@ -72,13 +72,13 @@ ExpandModularHeadersPPCallbacks::ExpandModularHeadersPPCallbacks(
auto HSO = std::make_shared<HeaderSearchOptions>();
*HSO = Compiler.getHeaderSearchOpts();
- HeaderInfo = llvm::make_unique<HeaderSearch>(HSO, Sources, Diags, LangOpts,
+ HeaderInfo = std::make_unique<HeaderSearch>(HSO, Sources, Diags, LangOpts,
&Compiler.getTarget());
auto PO = std::make_shared<PreprocessorOptions>();
*PO = Compiler.getPreprocessorOpts();
- PP = llvm::make_unique<clang::Preprocessor>(PO, Diags, LangOpts, Sources,
+ PP = std::make_unique<clang::Preprocessor>(PO, Diags, LangOpts, Sources,
*HeaderInfo, ModuleLoader,
/*IILookup=*/nullptr,
/*OwnsHeaderSearch=*/false);
diff --git a/clang-tools-extra/clang-tidy/abseil/StringFindStartswithCheck.cpp b/clang-tools-extra/clang-tidy/abseil/StringFindStartswithCheck.cpp
index 3fd9fd47482..9fc7f7d36a6 100644
--- a/clang-tools-extra/clang-tidy/abseil/StringFindStartswithCheck.cpp
+++ b/clang-tools-extra/clang-tidy/abseil/StringFindStartswithCheck.cpp
@@ -115,7 +115,7 @@ void StringFindStartswithCheck::check(const MatchFinder::MatchResult &Result) {
void StringFindStartswithCheck::registerPPCallbacks(
const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) {
- IncludeInserter = llvm::make_unique<utils::IncludeInserter>(SM, getLangOpts(),
+ IncludeInserter = std::make_unique<utils::IncludeInserter>(SM, getLangOpts(),
IncludeStyle);
PP->addPPCallbacks(IncludeInserter->CreatePPCallbacks());
}
diff --git a/clang-tools-extra/clang-tidy/bugprone/LambdaFunctionNameCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/LambdaFunctionNameCheck.cpp
index cc8cb3bd68e..2b7edc1411e 100644
--- a/clang-tools-extra/clang-tidy/bugprone/LambdaFunctionNameCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/LambdaFunctionNameCheck.cpp
@@ -66,7 +66,7 @@ void LambdaFunctionNameCheck::registerMatchers(MatchFinder *Finder) {
void LambdaFunctionNameCheck::registerPPCallbacks(
const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) {
- PP->addPPCallbacks(llvm::make_unique<MacroExpansionsWithFileAndLine>(
+ PP->addPPCallbacks(std::make_unique<MacroExpansionsWithFileAndLine>(
&SuppressMacroExpansions));
}
diff --git a/clang-tools-extra/clang-tidy/bugprone/MacroParenthesesCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/MacroParenthesesCheck.cpp
index 874cd470e07..7ca5c1e3454 100644
--- a/clang-tools-extra/clang-tidy/bugprone/MacroParenthesesCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/MacroParenthesesCheck.cpp
@@ -250,7 +250,7 @@ void MacroParenthesesPPCallbacks::argument(const Token &MacroNameTok,
void MacroParenthesesCheck::registerPPCallbacks(
const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) {
- PP->addPPCallbacks(llvm::make_unique<MacroParenthesesPPCallbacks>(PP, this));
+ PP->addPPCallbacks(std::make_unique<MacroParenthesesPPCallbacks>(PP, this));
}
} // namespace bugprone
diff --git a/clang-tools-extra/clang-tidy/bugprone/MacroRepeatedSideEffectsCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/MacroRepeatedSideEffectsCheck.cpp
index ee703466ef2..add4d1db36f 100644
--- a/clang-tools-extra/clang-tidy/bugprone/MacroRepeatedSideEffectsCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/MacroRepeatedSideEffectsCheck.cpp
@@ -173,7 +173,7 @@ bool MacroRepeatedPPCallbacks::hasSideEffects(
void MacroRepeatedSideEffectsCheck::registerPPCallbacks(
const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) {
- PP->addPPCallbacks(::llvm::make_unique<MacroRepeatedPPCallbacks>(*this, *PP));
+ PP->addPPCallbacks(::std::make_unique<MacroRepeatedPPCallbacks>(*this, *PP));
}
} // namespace bugprone
diff --git a/clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp
index 8e316ebc7d7..2a5c5fa414d 100644
--- a/clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp
@@ -102,8 +102,8 @@ bool UseAfterMoveFinder::find(Stmt *FunctionBody, const Expr *MovingCall,
return false;
Sequence =
- llvm::make_unique<ExprSequence>(TheCFG.get(), FunctionBody, Context);
- BlockMap = llvm::make_unique<StmtToBlockMap>(TheCFG.get(), Context);
+ std::make_unique<ExprSequence>(TheCFG.get(), FunctionBody, Context);
+ BlockMap = std::make_unique<StmtToBlockMap>(TheCFG.get(), Context);
Visited.clear();
const CFGBlock *Block = BlockMap->blockContainingStmt(MovingCall);
diff --git a/clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.cpp b/clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.cpp
index 87ac2de5f65..a7a78ec5baa 100644
--- a/clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.cpp
+++ b/clang-tools-extra/clang-tidy/cert/SetLongJmpCheck.cpp
@@ -51,7 +51,7 @@ void SetLongJmpCheck::registerPPCallbacks(const SourceManager &SM,
// 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<SetJmpMacroCallbacks>(*this));
+ PP->addPPCallbacks(std::make_unique<SetJmpMacroCallbacks>(*this));
}
void SetLongJmpCheck::registerMatchers(MatchFinder *Finder) {
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/MacroUsageCheck.cpp b/clang-tools-extra/clang-tidy/cppcoreguidelines/MacroUsageCheck.cpp
index ac5ec130f46..21aead58d9b 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/MacroUsageCheck.cpp
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/MacroUsageCheck.cpp
@@ -74,7 +74,7 @@ void MacroUsageCheck::registerPPCallbacks(const SourceManager &SM,
if (!getLangOpts().CPlusPlus11)
return;
- PP->addPPCallbacks(llvm::make_unique<MacroUsageCallbacks>(
+ PP->addPPCallbacks(std::make_unique<MacroUsageCallbacks>(
this, SM, AllowedRegexp, CheckCapsOnly, IgnoreCommandLineMacros));
}
diff --git a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp
index 28fccfdbabd..7cd6603790b 100644
--- a/clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp
+++ b/clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp
@@ -35,7 +35,7 @@ void ProBoundsConstantArrayIndexCheck::registerPPCallbacks(
if (!getLangOpts().CPlusPlus)
return;
- Inserter = llvm::make_unique<utils::IncludeInserter>(SM, getLangOpts(),
+ Inserter = std::make_unique<utils::IncludeInserter>(SM, getLangOpts(),
IncludeStyle);
PP->addPPCallbacks(Inserter->CreatePPCallbacks());
}
diff --git a/clang-tools-extra/clang-tidy/fuchsia/RestrictSystemIncludesCheck.cpp b/clang-tools-extra/clang-tidy/fuchsia/RestrictSystemIncludesCheck.cpp
index 08981fce0f5..98d317bea37 100644
--- a/clang-tools-extra/clang-tidy/fuchsia/RestrictSystemIncludesCheck.cpp
+++ b/clang-tools-extra/clang-tidy/fuchsia/RestrictSystemIncludesCheck.cpp
@@ -103,7 +103,7 @@ void RestrictedIncludesPPCallbacks::EndOfMainFile() {
void RestrictSystemIncludesCheck::registerPPCallbacks(
const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) {
PP->addPPCallbacks(
- llvm::make_unique<RestrictedIncludesPPCallbacks>(*this, SM));
+ std::make_unique<RestrictedIncludesPPCallbacks>(*this, SM));
}
void RestrictSystemIncludesCheck::storeOptions(
diff --git a/clang-tools-extra/clang-tidy/google/AvoidUnderscoreInGoogletestNameCheck.cpp b/clang-tools-extra/clang-tidy/google/AvoidUnderscoreInGoogletestNameCheck.cpp
index d279343e27d..a811d37af77 100644
--- a/clang-tools-extra/clang-tidy/google/AvoidUnderscoreInGoogletestNameCheck.cpp
+++ b/clang-tools-extra/clang-tidy/google/AvoidUnderscoreInGoogletestNameCheck.cpp
@@ -79,7 +79,7 @@ private:
void AvoidUnderscoreInGoogletestNameCheck::registerPPCallbacks(
const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) {
PP->addPPCallbacks(
- llvm::make_unique<AvoidUnderscoreInGoogletestNameCallback>(PP, this));
+ std::make_unique<AvoidUnderscoreInGoogletestNameCallback>(PP, this));
}
} // namespace readability
diff --git a/clang-tools-extra/clang-tidy/google/IntegerTypesCheck.cpp b/clang-tools-extra/clang-tidy/google/IntegerTypesCheck.cpp
index fb6fd3be3df..f41eba2c629 100644
--- a/clang-tools-extra/clang-tidy/google/IntegerTypesCheck.cpp
+++ b/clang-tools-extra/clang-tidy/google/IntegerTypesCheck.cpp
@@ -68,7 +68,7 @@ void IntegerTypesCheck::registerMatchers(MatchFinder *Finder) {
callee(functionDecl(hasAttr(attr::Format)))))))
.bind("tl"),
this);
- IdentTable = llvm::make_unique<IdentifierTable>(getLangOpts());
+ IdentTable = std::make_unique<IdentifierTable>(getLangOpts());
}
void IntegerTypesCheck::check(const MatchFinder::MatchResult &Result) {
diff --git a/clang-tools-extra/clang-tidy/google/TodoCommentCheck.cpp b/clang-tools-extra/clang-tidy/google/TodoCommentCheck.cpp
index 40d65a654a9..787c30548d4 100644
--- a/clang-tools-extra/clang-tidy/google/TodoCommentCheck.cpp
+++ b/clang-tools-extra/clang-tidy/google/TodoCommentCheck.cpp
@@ -52,7 +52,7 @@ private:
TodoCommentCheck::TodoCommentCheck(StringRef Name, ClangTidyContext *Context)
: ClangTidyCheck(Name, Context),
- Handler(llvm::make_unique<TodoCommentHandler>(
+ Handler(std::make_unique<TodoCommentHandler>(
*this, Context->getOptions().User)) {}
void TodoCommentCheck::registerPPCallbacks(const SourceManager &SM,
diff --git a/clang-tools-extra/clang-tidy/google/UpgradeGoogletestCaseCheck.cpp b/clang-tools-extra/clang-tidy/google/UpgradeGoogletestCaseCheck.cpp
index 955a888139a..27307c000f7 100644
--- a/clang-tools-extra/clang-tidy/google/UpgradeGoogletestCaseCheck.cpp
+++ b/clang-tools-extra/clang-tidy/google/UpgradeGoogletestCaseCheck.cpp
@@ -125,7 +125,7 @@ void UpgradeGoogletestCaseCheck::registerPPCallbacks(const SourceManager &,
return;
PP->addPPCallbacks(
- llvm::make_unique<UpgradeGoogletestCasePPCallback>(this, PP));
+ std::make_unique<UpgradeGoogletestCasePPCallback>(this, PP));
}
void UpgradeGoogletestCaseCheck::registerMatchers(MatchFinder *Finder) {
diff --git a/clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp b/clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp
index a894c5815fe..009a5a6377f 100644
--- a/clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp
+++ b/clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp
@@ -53,7 +53,7 @@ private:
void IncludeOrderCheck::registerPPCallbacks(const SourceManager &SM,
Preprocessor *PP,
Preprocessor *ModuleExpanderPP) {
- PP->addPPCallbacks(::llvm::make_unique<IncludeOrderPPCallbacks>(*this, SM));
+ PP->addPPCallbacks(::std::make_unique<IncludeOrderPPCallbacks>(*this, SM));
}
static int getPriority(StringRef Filename, bool IsAngled, bool IsMainModule) {
diff --git a/clang-tools-extra/clang-tidy/misc/UnusedParametersCheck.cpp b/clang-tools-extra/clang-tidy/misc/UnusedParametersCheck.cpp
index 4dbc4fda212..9514c044277 100644
--- a/clang-tools-extra/clang-tidy/misc/UnusedParametersCheck.cpp
+++ b/clang-tools-extra/clang-tidy/misc/UnusedParametersCheck.cpp
@@ -135,7 +135,7 @@ void UnusedParametersCheck::warnOnUnusedParameter(
auto MyDiag = diag(Param->getLocation(), "parameter %0 is unused") << Param;
if (!Indexer) {
- Indexer = llvm::make_unique<IndexerVisitor>(*Result.Context);
+ Indexer = std::make_unique<IndexerVisitor>(*Result.Context);
}
// Cannot remove parameter for non-local functions.
diff --git a/clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.cpp b/clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.cpp
index af4d47c026e..264a6f04786 100644
--- a/clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.cpp
@@ -44,7 +44,7 @@ void DeprecatedHeadersCheck::registerPPCallbacks(
const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) {
if (getLangOpts().CPlusPlus) {
PP->addPPCallbacks(
- ::llvm::make_unique<IncludeModernizePPCallbacks>(*this, getLangOpts()));
+ ::std::make_unique<IncludeModernizePPCallbacks>(*this, getLangOpts()));
}
}
diff --git a/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp b/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp
index 5fbc7be3749..44ff0641fd2 100644
--- a/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp
@@ -69,7 +69,7 @@ void MakeSmartPtrCheck::registerPPCallbacks(const SourceManager &SM,
Preprocessor *PP,
Preprocessor *ModuleExpanderPP) {
if (isLanguageVersionSupported(getLangOpts())) {
- Inserter = llvm::make_unique<utils::IncludeInserter>(SM, getLangOpts(),
+ Inserter = std::make_unique<utils::IncludeInserter>(SM, getLangOpts(),
IncludeStyle);
PP->addPPCallbacks(Inserter->CreatePPCallbacks());
}
@@ -128,7 +128,7 @@ void MakeSmartPtrCheck::check(const MatchFinder::MatchResult &Result) {
// Be conservative for cases where we construct an array without any
// initalization.
// For example,
- // P.reset(new int[5]) // check fix: P = make_unique<int []>(5)
+ // P.reset(new int[5]) // check fix: P = std::make_unique<int []>(5)
//
// The fix of the check has side effect, it introduces default initialization
// which maybe unexpected and cause performance regression.
diff --git a/clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp b/clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp
index a83e54a1c68..a08aa2ba6fc 100644
--- a/clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp
@@ -171,7 +171,7 @@ void PassByValueCheck::registerPPCallbacks(const SourceManager &SM,
// currently does not provide any benefit to other languages, despite being
// benign.
if (getLangOpts().CPlusPlus) {
- Inserter = llvm::make_unique<utils::IncludeInserter>(SM, getLangOpts(),
+ Inserter = std::make_unique<utils::IncludeInserter>(SM, getLangOpts(),
IncludeStyle);
PP->addPPCallbacks(Inserter->CreatePPCallbacks());
}
diff --git a/clang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.cpp b/clang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.cpp
index c1c223598c2..9551b128d7c 100644
--- a/clang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.cpp
@@ -140,7 +140,7 @@ void ReplaceAutoPtrCheck::registerPPCallbacks(const SourceManager &SM,
// benign.
if (!getLangOpts().CPlusPlus)
return;
- Inserter = llvm::make_unique<utils::IncludeInserter>(SM, getLangOpts(),
+ Inserter = std::make_unique<utils::IncludeInserter>(SM, getLangOpts(),
IncludeStyle);
PP->addPPCallbacks(Inserter->CreatePPCallbacks());
}
diff --git a/clang-tools-extra/clang-tidy/modernize/ReplaceRandomShuffleCheck.cpp b/clang-tools-extra/clang-tidy/modernize/ReplaceRandomShuffleCheck.cpp
index 44c108c8e20..dbaceca1cdc 100644
--- a/clang-tools-extra/clang-tidy/modernize/ReplaceRandomShuffleCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/ReplaceRandomShuffleCheck.cpp
@@ -44,7 +44,7 @@ void ReplaceRandomShuffleCheck::registerMatchers(MatchFinder *Finder) {
void ReplaceRandomShuffleCheck::registerPPCallbacks(
const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) {
- IncludeInserter = llvm::make_unique<utils::IncludeInserter>(SM, getLangOpts(),
+ IncludeInserter = std::make_unique<utils::IncludeInserter>(SM, getLangOpts(),
IncludeStyle);
PP->addPPCallbacks(IncludeInserter->CreatePPCallbacks());
}
diff --git a/clang-tools-extra/clang-tidy/performance/MoveConstructorInitCheck.cpp b/clang-tools-extra/clang-tidy/performance/MoveConstructorInitCheck.cpp
index aa5c8199f6b..f64d91b0a94 100644
--- a/clang-tools-extra/clang-tidy/performance/MoveConstructorInitCheck.cpp
+++ b/clang-tools-extra/clang-tidy/performance/MoveConstructorInitCheck.cpp
@@ -93,7 +93,7 @@ void MoveConstructorInitCheck::check(const MatchFinder::MatchResult &Result) {
void MoveConstructorInitCheck::registerPPCallbacks(
const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) {
- Inserter = llvm::make_unique<utils::IncludeInserter>(SM, getLangOpts(),
+ Inserter = std::make_unique<utils::IncludeInserter>(SM, getLangOpts(),
IncludeStyle);
PP->addPPCallbacks(Inserter->CreatePPCallbacks());
}
diff --git a/clang-tools-extra/clang-tidy/performance/TypePromotionInMathFnCheck.cpp b/clang-tools-extra/clang-tidy/performance/TypePromotionInMathFnCheck.cpp
index 652a6f9eb88..01d0e03942b 100644
--- a/clang-tools-extra/clang-tidy/performance/TypePromotionInMathFnCheck.cpp
+++ b/clang-tools-extra/clang-tidy/performance/TypePromotionInMathFnCheck.cpp
@@ -36,7 +36,7 @@ TypePromotionInMathFnCheck::TypePromotionInMathFnCheck(
void TypePromotionInMathFnCheck::registerPPCallbacks(
const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) {
- IncludeInserter = llvm::make_unique<utils::IncludeInserter>(SM, getLangOpts(),
+ IncludeInserter = std::make_unique<utils::IncludeInserter>(SM, getLangOpts(),
IncludeStyle);
PP->addPPCallbacks(IncludeInserter->CreatePPCallbacks());
}
diff --git a/clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp b/clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp
index cf660815297..c5bbcdb23c5 100644
--- a/clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp
+++ b/clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp
@@ -169,7 +169,7 @@ void UnnecessaryValueParamCheck::check(const MatchFinder::MatchResult &Result) {
void UnnecessaryValueParamCheck::registerPPCallbacks(
const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) {
- Inserter = llvm::make_unique<utils::IncludeInserter>(SM, getLangOpts(),
+ Inserter = std::make_unique<utils::IncludeInserter>(SM, getLangOpts(),
IncludeStyle);
PP->addPPCallbacks(Inserter->CreatePPCallbacks());
}
diff --git a/clang-tools-extra/clang-tidy/plugin/ClangTidyPlugin.cpp b/clang-tools-extra/clang-tidy/plugin/ClangTidyPlugin.cpp
index 10165518161..aff11bdc1f2 100644
--- a/clang-tools-extra/clang-tidy/plugin/ClangTidyPlugin.cpp
+++ b/clang-tools-extra/clang-tidy/plugin/ClangTidyPlugin.cpp
@@ -42,7 +42,7 @@ public:
auto ExternalDiagEngine = &Compiler.getDiagnostics();
auto DiagConsumer =
new ClangTidyDiagnosticConsumer(*Context, ExternalDiagEngine);
- auto DiagEngine = llvm::make_unique<DiagnosticsEngine>(
+ auto DiagEngine = std::make_unique<DiagnosticsEngine>(
new DiagnosticIDs, new DiagnosticOptions, DiagConsumer);
Context->setDiagnosticsEngine(DiagEngine.get());
@@ -51,7 +51,7 @@ public:
std::vector<std::unique_ptr<ASTConsumer>> Vec;
Vec.push_back(Factory.CreateASTConsumer(Compiler, File));
- return llvm::make_unique<WrapConsumer>(
+ return std::make_unique<WrapConsumer>(
std::move(Context), std::move(DiagEngine), std::move(Vec));
}
@@ -67,9 +67,9 @@ public:
if (Arg.startswith("-checks="))
OverrideOptions.Checks = Arg.substr(strlen("-checks="));
- auto Options = llvm::make_unique<FileOptionsProvider>(
+ auto Options = std::make_unique<FileOptionsProvider>(
GlobalOptions, DefaultOptions, OverrideOptions);
- Context = llvm::make_unique<ClangTidyContext>(std::move(Options));
+ Context = std::make_unique<ClangTidyContext>(std::move(Options));
return true;
}
diff --git a/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp b/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp
index 1bdfe2124e9..2795cabdd0a 100644
--- a/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp
+++ b/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp
@@ -243,7 +243,7 @@ void IdentifierNamingCheck::registerMatchers(MatchFinder *Finder) {
void IdentifierNamingCheck::registerPPCallbacks(
const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) {
ModuleExpanderPP->addPPCallbacks(
- llvm::make_unique<IdentifierNamingCheckPPCallbacks>(ModuleExpanderPP,
+ std::make_unique<IdentifierNamingCheckPPCallbacks>(ModuleExpanderPP,
this));
}
diff --git a/clang-tools-extra/clang-tidy/readability/RedundantPreprocessorCheck.cpp b/clang-tools-extra/clang-tidy/readability/RedundantPreprocessorCheck.cpp
index ea46d533662..295d22dd04d 100644
--- a/clang-tools-extra/clang-tidy/readability/RedundantPreprocessorCheck.cpp
+++ b/clang-tools-extra/clang-tidy/readability/RedundantPreprocessorCheck.cpp
@@ -99,7 +99,7 @@ private:
void RedundantPreprocessorCheck::registerPPCallbacks(
const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) {
PP->addPPCallbacks(
- ::llvm::make_unique<RedundantPreprocessorCallbacks>(*this, *PP));
+ ::std::make_unique<RedundantPreprocessorCallbacks>(*this, *PP));
}
} // namespace readability
diff --git a/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp b/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp
index 07bf27b59d2..a8ad9cd4779 100644
--- a/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp
+++ b/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp
@@ -289,7 +289,7 @@ static std::unique_ptr<ClangTidyOptionsProvider> createOptionsProvider(
if (!Config.empty()) {
if (llvm::ErrorOr<ClangTidyOptions> ParsedConfig =
parseConfiguration(Config)) {
- return llvm::make_unique<ConfigOptionsProvider>(
+ return std::make_unique<ConfigOptionsProvider>(
GlobalOptions,
ClangTidyOptions::getDefaults().mergeWith(DefaultOptions),
*ParsedConfig, OverrideOptions);
@@ -299,7 +299,7 @@ static std::unique_ptr<ClangTidyOptionsProvider> createOptionsProvider(
return nullptr;
}
}
- return llvm::make_unique<FileOptionsProvider>(GlobalOptions, DefaultOptions,
+ return std::make_unique<FileOptionsProvider>(GlobalOptions, DefaultOptions,
OverrideOptions, std::move(FS));
}
diff --git a/clang-tools-extra/clang-tidy/utils/HeaderGuard.cpp b/clang-tools-extra/clang-tidy/utils/HeaderGuard.cpp
index 366d7d42588..b988ef62e21 100644
--- a/clang-tools-extra/clang-tidy/utils/HeaderGuard.cpp
+++ b/clang-tools-extra/clang-tidy/utils/HeaderGuard.cpp
@@ -269,7 +269,7 @@ private:
void HeaderGuardCheck::registerPPCallbacks(const SourceManager &SM,
Preprocessor *PP,
Preprocessor *ModuleExpanderPP) {
- PP->addPPCallbacks(llvm::make_unique<HeaderGuardPPCallbacks>(PP, this));
+ PP->addPPCallbacks(std::make_unique<HeaderGuardPPCallbacks>(PP, this));
}
bool HeaderGuardCheck::shouldSuggestEndifComment(StringRef FileName) {
diff --git a/clang-tools-extra/clang-tidy/utils/IncludeInserter.cpp b/clang-tools-extra/clang-tidy/utils/IncludeInserter.cpp
index 6b366cf2729..e0d02f3e97c 100644
--- a/clang-tools-extra/clang-tidy/utils/IncludeInserter.cpp
+++ b/clang-tools-extra/clang-tidy/utils/IncludeInserter.cpp
@@ -42,7 +42,7 @@ IncludeInserter::IncludeInserter(const SourceManager &SourceMgr,
IncludeInserter::~IncludeInserter() {}
std::unique_ptr<PPCallbacks> IncludeInserter::CreatePPCallbacks() {
- return llvm::make_unique<IncludeInserterCallback>(this);
+ return std::make_unique<IncludeInserterCallback>(this);
}
llvm::Optional<FixItHint>
@@ -58,7 +58,7 @@ IncludeInserter::CreateIncludeInsertion(FileID FileID, StringRef Header,
// file.
IncludeSorterByFile.insert(std::make_pair(
FileID,
- llvm::make_unique<IncludeSorter>(
+ std::make_unique<IncludeSorter>(
&SourceMgr, &LangOpts, FileID,
SourceMgr.getFilename(SourceMgr.getLocForStartOfFile(FileID)),
Style)));
@@ -72,7 +72,7 @@ void IncludeInserter::AddInclude(StringRef FileName, bool IsAngled,
FileID FileID = SourceMgr.getFileID(HashLocation);
if (IncludeSorterByFile.find(FileID) == IncludeSorterByFile.end()) {
IncludeSorterByFile.insert(std::make_pair(
- FileID, llvm::make_unique<IncludeSorter>(
+ FileID, std::make_unique<IncludeSorter>(
&SourceMgr, &LangOpts, FileID,
SourceMgr.getFilename(HashLocation), Style)));
}
diff --git a/clang-tools-extra/clang-tidy/utils/IncludeInserter.h b/clang-tools-extra/clang-tidy/utils/IncludeInserter.h
index 36c16aca459..e67604fd851 100644
--- a/clang-tools-extra/clang-tidy/utils/IncludeInserter.h
+++ b/clang-tools-extra/clang-tidy/utils/IncludeInserter.h
@@ -33,7 +33,7 @@ namespace utils {
/// public:
/// void registerPPCallbacks(const SourceManager &SM, Preprocessor *PP,
/// Preprocessor *ModuleExpanderPP) override {
-/// Inserter = llvm::make_unique<IncludeInserter>(
+/// Inserter = std::make_unique<IncludeInserter>(
/// SM, getLangOpts(), utils::IncludeSorter::IS_Google);
/// PP->addPPCallbacks(Inserter->CreatePPCallbacks());
/// }
diff --git a/clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.cpp b/clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.cpp
index 2758b18f108..4c17a5ce273 100644
--- a/clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.cpp
+++ b/clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.cpp
@@ -53,7 +53,7 @@ void TransformerClangTidyCheck::registerPPCallbacks(
if (Rule && llvm::any_of(Rule->Cases, [](const RewriteRule::Case &C) {
return !C.AddedIncludes.empty();
})) {
- Inserter = llvm::make_unique<IncludeInserter>(
+ Inserter = std::make_unique<IncludeInserter>(
SM, getLangOpts(), utils::IncludeSorter::IS_LLVM);
PP->addPPCallbacks(Inserter->CreatePPCallbacks());
}
diff --git a/clang-tools-extra/clangd/ClangdLSPServer.cpp b/clang-tools-extra/clangd/ClangdLSPServer.cpp
index ac8553ba220..a9bdd06914d 100644
--- a/clang-tools-extra/clangd/ClangdLSPServer.cpp
+++ b/clang-tools-extra/clangd/ClangdLSPServer.cpp
@@ -426,7 +426,7 @@ void ClangdLSPServer::onInitialize(const InitializeParams &Params,
if (const auto &Dir = Params.initializationOptions.compilationDatabasePath)
CompileCommandsDir = Dir;
if (UseDirBasedCDB) {
- BaseCDB = llvm::make_unique<DirectoryBasedGlobalCompilationDatabase>(
+ BaseCDB = std::make_unique<DirectoryBasedGlobalCompilationDatabase>(
CompileCommandsDir);
BaseCDB = getQueryDriverDatabase(
llvm::makeArrayRef(ClangdServerOpts.QueryDriverGlobs),
diff --git a/clang-tools-extra/clangd/ClangdServer.cpp b/clang-tools-extra/clangd/ClangdServer.cpp
index ae2b2d9d8c1..428eb764b64 100644
--- a/clang-tools-extra/clangd/ClangdServer.cpp
+++ b/clang-tools-extra/clangd/ClangdServer.cpp
@@ -127,13 +127,13 @@ ClangdServer::ClangdServer(const GlobalCompilationDatabase &CDB,
// critical paths.
WorkScheduler(
CDB, Opts.AsyncThreadsCount, Opts.StorePreamblesInMemory,
- llvm::make_unique<UpdateIndexCallbacks>(
+ std::make_unique<UpdateIndexCallbacks>(
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<MergedIndex>(Idx, this->Index));
+ MergedIdx.push_back(std::make_unique<MergedIndex>(Idx, this->Index));
this->Index = MergedIdx.back().get();
} else {
this->Index = Idx;
@@ -142,7 +142,7 @@ ClangdServer::ClangdServer(const GlobalCompilationDatabase &CDB,
if (Opts.StaticIndex)
AddIndex(Opts.StaticIndex);
if (Opts.BackgroundIndex) {
- BackgroundIdx = llvm::make_unique<BackgroundIndex>(
+ BackgroundIdx = std::make_unique<BackgroundIndex>(
Context::current().clone(), FSProvider, CDB,
BackgroundIndexStorage::createDiskBackedStorageFactory(
[&CDB](llvm::StringRef File) { return CDB.getProjectInfo(File); }),
diff --git a/clang-tools-extra/clangd/ClangdUnit.cpp b/clang-tools-extra/clangd/ClangdUnit.cpp
index ced79b9f0b2..9ba4e7065db 100644
--- a/clang-tools-extra/clangd/ClangdUnit.cpp
+++ b/clang-tools-extra/clangd/ClangdUnit.cpp
@@ -96,7 +96,7 @@ public:
protected:
std::unique_ptr<ASTConsumer>
CreateASTConsumer(CompilerInstance &CI, llvm::StringRef InFile) override {
- return llvm::make_unique<DeclTrackingASTConsumer>(/*ref*/ TopLevelDecls);
+ return std::make_unique<DeclTrackingASTConsumer>(/*ref*/ TopLevelDecls);
}
private:
@@ -160,9 +160,9 @@ public:
std::unique_ptr<PPCallbacks> createPPCallbacks() override {
assert(SourceMgr && "SourceMgr must be set at this point");
- return llvm::make_unique<PPChainedCallbacks>(
+ return std::make_unique<PPChainedCallbacks>(
collectIncludeStructureCallback(*SourceMgr, &Includes),
- llvm::make_unique<CollectMainFileMacros>(*SourceMgr, &MainFileMacros));
+ std::make_unique<CollectMainFileMacros>(*SourceMgr, &MainFileMacros));
}
CommentHandler *getCommentHandler() override {
@@ -311,7 +311,7 @@ ParsedAST::build(std::unique_ptr<CompilerInvocation> CI,
if (!Clang)
return None;
- auto Action = llvm::make_unique<ClangdFrontendAction>();
+ auto Action = std::make_unique<ClangdFrontendAction>();
const FrontendInputFile &MainInput = Clang->getFrontendOpts().Inputs[0];
if (!Action->BeginSourceFile(*Clang, MainInput)) {
log("BeginSourceFile() failed when building AST for {0}",
@@ -335,7 +335,7 @@ ParsedAST::build(std::unique_ptr<CompilerInvocation> CI,
tidy::ClangTidyCheckFactories CTFactories;
for (const auto &E : tidy::ClangTidyModuleRegistry::entries())
E.instantiate()->addCheckFactories(CTFactories);
- CTContext.emplace(llvm::make_unique<tidy::DefaultOptionsProvider>(
+ CTContext.emplace(std::make_unique<tidy::DefaultOptionsProvider>(
tidy::ClangTidyGlobalOptions(), Opts.ClangTidyOpts));
CTContext->setDiagnosticsEngine(&Clang->getDiagnostics());
CTContext->setASTContext(&Clang->getASTContext());
@@ -616,7 +616,7 @@ buildPreamble(PathRef FileName, CompilerInvocation &CI,
llvm::SmallString<32> AbsFileName(FileName);
Inputs.FS->makeAbsolute(AbsFileName);
- auto StatCache = llvm::make_unique<PreambleFileStatusCache>(AbsFileName);
+ auto StatCache = std::make_unique<PreambleFileStatusCache>(AbsFileName);
auto BuiltPreamble = PrecompiledPreamble::Build(
CI, ContentsBuffer.get(), Bounds, *PreambleDiagsEngine,
StatCache->getProducingFS(Inputs.FS),
@@ -659,7 +659,7 @@ buildAST(PathRef FileName, std::unique_ptr<CompilerInvocation> Invocation,
}
return ParsedAST::build(
- llvm::make_unique<CompilerInvocation>(*Invocation), Preamble,
+ std::make_unique<CompilerInvocation>(*Invocation), Preamble,
llvm::MemoryBuffer::getMemBufferCopy(Inputs.Contents, FileName),
std::move(VFS), Inputs.Index, Inputs.Opts);
}
diff --git a/clang-tools-extra/clangd/CodeComplete.cpp b/clang-tools-extra/clangd/CodeComplete.cpp
index 79e19bda625..b5304dbffe7 100644
--- a/clang-tools-extra/clangd/CodeComplete.cpp
+++ b/clang-tools-extra/clangd/CodeComplete.cpp
@@ -1252,7 +1252,7 @@ public:
// - completion results based on the AST.
// - partial identifier and context. We need these for the index query.
CodeCompleteResult Output;
- auto RecorderOwner = llvm::make_unique<CompletionRecorder>(Opts, [&]() {
+ auto RecorderOwner = std::make_unique<CompletionRecorder>(Opts, [&]() {
assert(Recorder && "Recorder is not set");
CCContextKind = Recorder->CCContext.getKind();
auto Style = getFormatStyleForFile(
@@ -1756,7 +1756,7 @@ SignatureHelp signatureHelp(PathRef FileName,
Options.IncludeBriefComments = false;
IncludeStructure PreambleInclusions; // Unused for signatureHelp
semaCodeComplete(
- llvm::make_unique<SignatureHelpCollector>(Options, Index, Result),
+ std::make_unique<SignatureHelpCollector>(Options, Index, Result),
Options,
{FileName, Command, Preamble, Contents, *Offset, std::move(VFS)});
return Result;
diff --git a/clang-tools-extra/clangd/Compiler.cpp b/clang-tools-extra/clangd/Compiler.cpp
index 7758e03957d..22d1fc956bf 100644
--- a/clang-tools-extra/clangd/Compiler.cpp
+++ b/clang-tools-extra/clangd/Compiler.cpp
@@ -88,7 +88,7 @@ prepareCompilerInstance(std::unique_ptr<clang::CompilerInvocation> CI,
CI->getFrontendOpts().Inputs[0].getFile(), Buffer.get());
}
- auto Clang = llvm::make_unique<CompilerInstance>(
+ auto Clang = std::make_unique<CompilerInstance>(
std::make_shared<PCHContainerOperations>());
Clang->setInvocation(std::move(CI));
Clang->createDiagnostics(&DiagsClient, false);
diff --git a/clang-tools-extra/clangd/Context.h b/clang-tools-extra/clangd/Context.h
index 0bb4cbd9f66..01b592fb00f 100644
--- a/clang-tools-extra/clangd/Context.h
+++ b/clang-tools-extra/clangd/Context.h
@@ -122,7 +122,7 @@ public:
typename std::decay<Type>::type Value) const & {
return Context(std::make_shared<Data>(Data{
/*Parent=*/DataPtr, &Key,
- llvm::make_unique<TypedAnyStorage<typename std::decay<Type>::type>>(
+ std::make_unique<TypedAnyStorage<typename std::decay<Type>::type>>(
std::move(Value))}));
}
@@ -132,7 +132,7 @@ public:
typename std::decay<Type>::type Value) && /* takes ownership */ {
return Context(std::make_shared<Data>(Data{
/*Parent=*/std::move(DataPtr), &Key,
- llvm::make_unique<TypedAnyStorage<typename std::decay<Type>::type>>(
+ std::make_unique<TypedAnyStorage<typename std::decay<Type>::type>>(
std::move(Value))}));
}
diff --git a/clang-tools-extra/clangd/Headers.cpp b/clang-tools-extra/clangd/Headers.cpp
index 7caaebaa6f3..525f770e943 100644
--- a/clang-tools-extra/clangd/Headers.cpp
+++ b/clang-tools-extra/clangd/Headers.cpp
@@ -112,7 +112,7 @@ llvm::SmallVector<llvm::StringRef, 1> getRankedIncludes(const Symbol &Sym) {
std::unique_ptr<PPCallbacks>
collectIncludeStructureCallback(const SourceManager &SM,
IncludeStructure *Out) {
- return llvm::make_unique<RecordHeaders>(SM, Out);
+ return std::make_unique<RecordHeaders>(SM, Out);
}
void IncludeStructure::recordInclude(llvm::StringRef IncludingName,
diff --git a/clang-tools-extra/clangd/JSONTransport.cpp b/clang-tools-extra/clangd/JSONTransport.cpp
index 173107772d8..4921035b6db 100644
--- a/clang-tools-extra/clangd/JSONTransport.cpp
+++ b/clang-tools-extra/clangd/JSONTransport.cpp
@@ -294,7 +294,7 @@ std::unique_ptr<Transport> newJSONTransport(std::FILE *In,
llvm::raw_ostream *InMirror,
bool Pretty,
JSONStreamStyle Style) {
- return llvm::make_unique<JSONTransport>(In, Out, InMirror, Pretty, Style);
+ return std::make_unique<JSONTransport>(In, Out, InMirror, Pretty, Style);
}
} // namespace clangd
diff --git a/clang-tools-extra/clangd/QueryDriverDatabase.cpp b/clang-tools-extra/clangd/QueryDriverDatabase.cpp
index bec6ea7186b..4953da52c32 100644
--- a/clang-tools-extra/clangd/QueryDriverDatabase.cpp
+++ b/clang-tools-extra/clangd/QueryDriverDatabase.cpp
@@ -277,7 +277,7 @@ getQueryDriverDatabase(llvm::ArrayRef<std::string> QueryDriverGlobs,
assert(Base && "Null base to SystemIncludeExtractor");
if (QueryDriverGlobs.empty())
return Base;
- return llvm::make_unique<QueryDriverDatabase>(QueryDriverGlobs,
+ return std::make_unique<QueryDriverDatabase>(QueryDriverGlobs,
std::move(Base));
}
diff --git a/clang-tools-extra/clangd/TUScheduler.cpp b/clang-tools-extra/clangd/TUScheduler.cpp
index 040c1bd0bb2..9e4d41d7b98 100644
--- a/clang-tools-extra/clangd/TUScheduler.cpp
+++ b/clang-tools-extra/clangd/TUScheduler.cpp
@@ -469,7 +469,7 @@ void ASTWorker::update(ParseInputs Inputs, WantDiagnostics WantDiags) {
if (!AST) {
llvm::Optional<ParsedAST> NewAST =
buildAST(FileName, std::move(Invocation), Inputs, NewPreamble);
- AST = NewAST ? llvm::make_unique<ParsedAST>(std::move(*NewAST)) : nullptr;
+ AST = NewAST ? std::make_unique<ParsedAST>(std::move(*NewAST)) : nullptr;
if (!(*AST)) { // buildAST fails.
TUStatus::BuildDetails Details;
Details.BuildFailed = true;
@@ -519,10 +519,10 @@ void ASTWorker::runWithAST(
llvm::Optional<ParsedAST> NewAST =
Invocation
? buildAST(FileName,
- llvm::make_unique<CompilerInvocation>(*Invocation),
+ std::make_unique<CompilerInvocation>(*Invocation),
*CurrentInputs, getPossiblyStalePreamble())
: None;
- AST = NewAST ? llvm::make_unique<ParsedAST>(std::move(*NewAST)) : nullptr;
+ AST = NewAST ? std::make_unique<ParsedAST>(std::move(*NewAST)) : nullptr;
}
// Make sure we put the AST back into the LRU cache.
auto _ = llvm::make_scope_exit(
@@ -832,9 +832,9 @@ TUScheduler::TUScheduler(const GlobalCompilationDatabase &CDB,
ASTRetentionPolicy RetentionPolicy)
: CDB(CDB), StorePreamblesInMemory(StorePreamblesInMemory),
Callbacks(Callbacks ? move(Callbacks)
- : llvm::make_unique<ParsingCallbacks>()),
+ : std::make_unique<ParsingCallbacks>()),
Barrier(AsyncThreadsCount),
- IdleASTs(llvm::make_unique<ASTCache>(RetentionPolicy.MaxRetainedASTs)),
+ IdleASTs(std::make_unique<ASTCache>(RetentionPolicy.MaxRetainedASTs)),
UpdateDebounce(UpdateDebounce) {
if (0 < AsyncThreadsCount) {
PreambleTasks.emplace();
diff --git a/clang-tools-extra/clangd/Trace.cpp b/clang-tools-extra/clangd/Trace.cpp
index 2318d9ca2f6..136069244ae 100644
--- a/clang-tools-extra/clangd/Trace.cpp
+++ b/clang-tools-extra/clangd/Trace.cpp
@@ -52,7 +52,7 @@ public:
// 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<JSONSpan>(this, Name, Args));
+ SpanKey, std::make_unique<JSONSpan>(this, Name, Args));
}
// Trace viewer requires each thread to properly stack events.
@@ -200,7 +200,7 @@ Session::~Session() { T = nullptr; }
std::unique_ptr<EventTracer> createJSONTracer(llvm::raw_ostream &OS,
bool Pretty) {
- return llvm::make_unique<JSONTracer>(OS, Pretty);
+ return std::make_unique<JSONTracer>(OS, Pretty);
}
void log(const llvm::Twine &Message) {
diff --git a/clang-tools-extra/clangd/URI.cpp b/clang-tools-extra/clangd/URI.cpp
index 107b3378b35..0029c2a664d 100644
--- a/clang-tools-extra/clangd/URI.cpp
+++ b/clang-tools-extra/clangd/URI.cpp
@@ -61,7 +61,7 @@ public:
llvm::Expected<std::unique_ptr<URIScheme>>
findSchemeByName(llvm::StringRef Scheme) {
if (Scheme == "file")
- return llvm::make_unique<FileSystemScheme>();
+ return std::make_unique<FileSystemScheme>();
for (auto I = URISchemeRegistry::begin(), E = URISchemeRegistry::end();
I != E; ++I) {
diff --git a/clang-tools-extra/clangd/index/Background.cpp b/clang-tools-extra/clangd/index/Background.cpp
index a9e28f8de99..6d2360e62ad 100644
--- a/clang-tools-extra/clangd/index/Background.cpp
+++ b/clang-tools-extra/clangd/index/Background.cpp
@@ -144,7 +144,7 @@ BackgroundIndex::BackgroundIndex(
Context BackgroundContext, const FileSystemProvider &FSProvider,
const GlobalCompilationDatabase &CDB,
BackgroundIndexStorage::Factory IndexStorageFactory, size_t ThreadPoolSize)
- : SwapIndex(llvm::make_unique<MemIndex>()), FSProvider(FSProvider),
+ : SwapIndex(std::make_unique<MemIndex>()), FSProvider(FSProvider),
CDB(CDB), BackgroundContext(std::move(BackgroundContext)),
Rebuilder(this, &IndexedSymbols, ThreadPoolSize),
IndexStorageFactory(std::move(IndexStorageFactory)),
@@ -300,10 +300,10 @@ void BackgroundIndex::update(
Refs.insert(RefToIDs[R], *R);
for (const auto *Rel : FileIt.second.Relations)
Relations.insert(*Rel);
- auto SS = llvm::make_unique<SymbolSlab>(std::move(Syms).build());
- auto RS = llvm::make_unique<RefSlab>(std::move(Refs).build());
- auto RelS = llvm::make_unique<RelationSlab>(std::move(Relations).build());
- auto IG = llvm::make_unique<IncludeGraph>(
+ auto SS = std::make_unique<SymbolSlab>(std::move(Syms).build());
+ auto RS = std::make_unique<RefSlab>(std::move(Refs).build());
+ auto RelS = std::make_unique<RelationSlab>(std::move(Relations).build());
+ auto IG = std::make_unique<IncludeGraph>(
getSubGraph(URI::create(Path), Index.Sources.getValue()));
// We need to store shards before updating the index, since the latter
@@ -466,14 +466,14 @@ BackgroundIndex::loadProject(std::vector<std::string> MainFiles) {
continue;
auto SS =
LS.Shard->Symbols
- ? llvm::make_unique<SymbolSlab>(std::move(*LS.Shard->Symbols))
+ ? std::make_unique<SymbolSlab>(std::move(*LS.Shard->Symbols))
: nullptr;
auto RS = LS.Shard->Refs
- ? llvm::make_unique<RefSlab>(std::move(*LS.Shard->Refs))
+ ? std::make_unique<RefSlab>(std::move(*LS.Shard->Refs))
: nullptr;
auto RelS =
LS.Shard->Relations
- ? llvm::make_unique<RelationSlab>(std::move(*LS.Shard->Relations))
+ ? std::make_unique<RelationSlab>(std::move(*LS.Shard->Relations))
: nullptr;
ShardVersion &SV = ShardVersions[LS.AbsolutePath];
SV.Digest = LS.Digest;
diff --git a/clang-tools-extra/clangd/index/BackgroundIndexStorage.cpp b/clang-tools-extra/clangd/index/BackgroundIndexStorage.cpp
index 8b2c411a166..86c73ff7420 100644
--- a/clang-tools-extra/clangd/index/BackgroundIndexStorage.cpp
+++ b/clang-tools-extra/clangd/index/BackgroundIndexStorage.cpp
@@ -91,7 +91,7 @@ public:
if (!Buffer)
return nullptr;
if (auto I = readIndexFile(Buffer->get()->getBuffer()))
- return llvm::make_unique<IndexFileIn>(std::move(*I));
+ return std::make_unique<IndexFileIn>(std::move(*I));
else
elog("Error while reading shard {0}: {1}", ShardIdentifier,
I.takeError());
@@ -128,7 +128,7 @@ class DiskBackedIndexStorageManager {
public:
DiskBackedIndexStorageManager(
std::function<llvm::Optional<ProjectInfo>(PathRef)> GetProjectInfo)
- : IndexStorageMapMu(llvm::make_unique<std::mutex>()),
+ : IndexStorageMapMu(std::make_unique<std::mutex>()),
GetProjectInfo(std::move(GetProjectInfo)) {
llvm::SmallString<128> HomeDir;
llvm::sys::path::home_directory(HomeDir);
@@ -151,9 +151,9 @@ private:
std::unique_ptr<BackgroundIndexStorage> create(PathRef CDBDirectory) {
if (CDBDirectory.empty()) {
elog("Tried to create storage for empty directory!");
- return llvm::make_unique<NullStorage>();
+ return std::make_unique<NullStorage>();
}
- return llvm::make_unique<DiskBackedIndexStorage>(CDBDirectory);
+ return std::make_unique<DiskBackedIndexStorage>(CDBDirectory);
}
Path HomeDir;
diff --git a/clang-tools-extra/clangd/index/CanonicalIncludes.cpp b/clang-tools-extra/clangd/index/CanonicalIncludes.cpp
index 55df267c4fa..18ef9b1e140 100644
--- a/clang-tools-extra/clangd/index/CanonicalIncludes.cpp
+++ b/clang-tools-extra/clangd/index/CanonicalIncludes.cpp
@@ -83,7 +83,7 @@ collectIWYUHeaderMaps(CanonicalIncludes *Includes) {
private:
CanonicalIncludes *const Includes;
};
- return llvm::make_unique<PragmaCommentHandler>(Includes);
+ return std::make_unique<PragmaCommentHandler>(Includes);
}
void addSystemHeadersMapping(CanonicalIncludes *Includes,
diff --git a/clang-tools-extra/clangd/index/FileIndex.cpp b/clang-tools-extra/clangd/index/FileIndex.cpp
index 53b8c62c9f0..95419af7be0 100644
--- a/clang-tools-extra/clangd/index/FileIndex.cpp
+++ b/clang-tools-extra/clangd/index/FileIndex.cpp
@@ -216,14 +216,14 @@ FileSymbols::buildIndex(IndexType Type, DuplicateHandling DuplicateHandle) {
// Index must keep the slabs and contiguous ranges alive.
switch (Type) {
case IndexType::Light:
- return llvm::make_unique<MemIndex>(
+ return std::make_unique<MemIndex>(
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<dex::Dex>(
+ return std::make_unique<dex::Dex>(
llvm::make_pointee_range(AllSymbols), std::move(AllRefs),
std::move(AllRelations),
std::make_tuple(std::move(SymbolSlabs), std::move(RefSlabs),
@@ -235,17 +235,17 @@ FileSymbols::buildIndex(IndexType Type, DuplicateHandling DuplicateHandle) {
FileIndex::FileIndex(bool UseDex)
: MergedIndex(&MainFileIndex, &PreambleIndex), UseDex(UseDex),
- PreambleIndex(llvm::make_unique<MemIndex>()),
- MainFileIndex(llvm::make_unique<MemIndex>()) {}
+ PreambleIndex(std::make_unique<MemIndex>()),
+ MainFileIndex(std::make_unique<MemIndex>()) {}
void FileIndex::updatePreamble(PathRef Path, ASTContext &AST,
std::shared_ptr<Preprocessor> PP,
const CanonicalIncludes &Includes) {
auto Slabs = indexHeaderSymbols(AST, std::move(PP), Includes);
PreambleSymbols.update(
- Path, llvm::make_unique<SymbolSlab>(std::move(std::get<0>(Slabs))),
- llvm::make_unique<RefSlab>(),
- llvm::make_unique<RelationSlab>(std::move(std::get<2>(Slabs))),
+ Path, std::make_unique<SymbolSlab>(std::move(std::get<0>(Slabs))),
+ std::make_unique<RefSlab>(),
+ std::make_unique<RelationSlab>(std::move(std::get<2>(Slabs))),
/*CountReferences=*/false);
PreambleIndex.reset(
PreambleSymbols.buildIndex(UseDex ? IndexType::Heavy : IndexType::Light,
@@ -255,9 +255,9 @@ void FileIndex::updatePreamble(PathRef Path, ASTContext &AST,
void FileIndex::updateMain(PathRef Path, ParsedAST &AST) {
auto Contents = indexMainDecls(AST);
MainFileSymbols.update(
- Path, llvm::make_unique<SymbolSlab>(std::move(std::get<0>(Contents))),
- llvm::make_unique<RefSlab>(std::move(std::get<1>(Contents))),
- llvm::make_unique<RelationSlab>(std::move(std::get<2>(Contents))),
+ Path, std::make_unique<SymbolSlab>(std::move(std::get<0>(Contents))),
+ std::make_unique<RefSlab>(std::move(std::get<1>(Contents))),
+ std::make_unique<RelationSlab>(std::move(std::get<2>(Contents))),
/*CountReferences=*/true);
MainFileIndex.reset(
MainFileSymbols.buildIndex(IndexType::Light, DuplicateHandling::Merge));
diff --git a/clang-tools-extra/clangd/index/IndexAction.cpp b/clang-tools-extra/clangd/index/IndexAction.cpp
index 84b69e9cbaf..2f7f722c8e4 100644
--- a/clang-tools-extra/clangd/index/IndexAction.cpp
+++ b/clang-tools-extra/clangd/index/IndexAction.cpp
@@ -136,7 +136,7 @@ public:
addSystemHeadersMapping(Includes.get(), CI.getLangOpts());
if (IncludeGraphCallback != nullptr)
CI.getPreprocessor().addPPCallbacks(
- llvm::make_unique<IncludeGraphCollector>(CI.getSourceManager(), IG));
+ std::make_unique<IncludeGraphCollector>(CI.getSourceManager(), IG));
return WrapperFrontendAction::CreateASTConsumer(CI, InFile);
}
@@ -199,9 +199,9 @@ std::unique_ptr<FrontendAction> createStaticIndexingAction(
Opts.RefFilter = RefKind::All;
Opts.RefsInHeaders = true;
}
- auto Includes = llvm::make_unique<CanonicalIncludes>();
+ auto Includes = std::make_unique<CanonicalIncludes>();
Opts.Includes = Includes.get();
- return llvm::make_unique<IndexAction>(
+ return std::make_unique<IndexAction>(
std::make_shared<SymbolCollector>(std::move(Opts)), std::move(Includes),
IndexOpts, SymbolsCallback, RefsCallback, RelationsCallback,
IncludeGraphCallback);
diff --git a/clang-tools-extra/clangd/index/MemIndex.cpp b/clang-tools-extra/clangd/index/MemIndex.cpp
index 2f3ff684531..8933f28f8cb 100644
--- a/clang-tools-extra/clangd/index/MemIndex.cpp
+++ b/clang-tools-extra/clangd/index/MemIndex.cpp
@@ -21,7 +21,7 @@ std::unique_ptr<SymbolIndex> MemIndex::build(SymbolSlab Slab, RefSlab Refs,
// 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<MemIndex>(Data.first, Data.second, Relations,
+ return std::make_unique<MemIndex>(Data.first, Data.second, Relations,
std::move(Data), BackingDataSize);
}
diff --git a/clang-tools-extra/clangd/index/SymbolCollector.cpp b/clang-tools-extra/clangd/index/SymbolCollector.cpp
index 5e3e1c21b04..d0b698ce4b2 100644
--- a/clang-tools-extra/clangd/index/SymbolCollector.cpp
+++ b/clang-tools-extra/clangd/index/SymbolCollector.cpp
@@ -206,7 +206,7 @@ void SymbolCollector::initialize(ASTContext &Ctx) {
ASTCtx = &Ctx;
CompletionAllocator = std::make_shared<GlobalCodeCompletionAllocator>();
CompletionTUInfo =
- llvm::make_unique<CodeCompletionTUInfo>(CompletionAllocator);
+ std::make_unique<CodeCompletionTUInfo>(CompletionAllocator);
}
bool SymbolCollector::shouldCollectSymbol(const NamedDecl &ND,
diff --git a/clang-tools-extra/clangd/index/dex/Dex.cpp b/clang-tools-extra/clangd/index/dex/Dex.cpp
index 853eb771fdd..996cd8b3c8a 100644
--- a/clang-tools-extra/clangd/index/dex/Dex.cpp
+++ b/clang-tools-extra/clangd/index/dex/Dex.cpp
@@ -29,7 +29,7 @@ std::unique_ptr<SymbolIndex> Dex::build(SymbolSlab Symbols, RefSlab Refs,
// 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<Dex>(Data.first, Data.second, Rels, std::move(Data),
+ return std::make_unique<Dex>(Data.first, Data.second, Rels, std::move(Data),
Size);
}
diff --git a/clang-tools-extra/clangd/index/dex/Iterator.cpp b/clang-tools-extra/clangd/index/dex/Iterator.cpp
index cb294a33eb3..abe3556098f 100644
--- a/clang-tools-extra/clangd/index/dex/Iterator.cpp
+++ b/clang-tools-extra/clangd/index/dex/Iterator.cpp
@@ -380,7 +380,7 @@ Corpus::intersect(std::vector<std::unique_ptr<Iterator>> Children) const {
case 1:
return std::move(RealChildren.front());
default:
- return llvm::make_unique<AndIterator>(std::move(RealChildren));
+ return std::make_unique<AndIterator>(std::move(RealChildren));
}
}
@@ -410,16 +410,16 @@ Corpus::unionOf(std::vector<std::unique_ptr<Iterator>> Children) const {
case 1:
return std::move(RealChildren.front());
default:
- return llvm::make_unique<OrIterator>(std::move(RealChildren));
+ return std::make_unique<OrIterator>(std::move(RealChildren));
}
}
std::unique_ptr<Iterator> Corpus::all() const {
- return llvm::make_unique<TrueIterator>(Size);
+ return std::make_unique<TrueIterator>(Size);
}
std::unique_ptr<Iterator> Corpus::none() const {
- return llvm::make_unique<FalseIterator>();
+ return std::make_unique<FalseIterator>();
}
std::unique_ptr<Iterator> Corpus::boost(std::unique_ptr<Iterator> Child,
@@ -428,14 +428,14 @@ std::unique_ptr<Iterator> Corpus::boost(std::unique_ptr<Iterator> Child,
return Child;
if (Child->kind() == Iterator::Kind::False)
return Child;
- return llvm::make_unique<BoostIterator>(std::move(Child), Factor);
+ return std::make_unique<BoostIterator>(std::move(Child), Factor);
}
std::unique_ptr<Iterator> Corpus::limit(std::unique_ptr<Iterator> Child,
size_t Limit) const {
if (Child->kind() == Iterator::Kind::False)
return Child;
- return llvm::make_unique<LimitIterator>(std::move(Child), Limit);
+ return std::make_unique<LimitIterator>(std::move(Child), Limit);
}
} // namespace dex
diff --git a/clang-tools-extra/clangd/index/dex/PostingList.cpp b/clang-tools-extra/clangd/index/dex/PostingList.cpp
index 99a50d557e3..e9e831637ef 100644
--- a/clang-tools-extra/clangd/index/dex/PostingList.cpp
+++ b/clang-tools-extra/clangd/index/dex/PostingList.cpp
@@ -220,7 +220,7 @@ PostingList::PostingList(llvm::ArrayRef<DocID> Documents)
: Chunks(encodeStream(Documents)) {}
std::unique_ptr<Iterator> PostingList::iterator(const Token *Tok) const {
- return llvm::make_unique<ChunkIterator>(Tok, Chunks);
+ return std::make_unique<ChunkIterator>(Tok, Chunks);
}
} // namespace dex
diff --git a/clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp b/clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp
index 820dc66b0f0..81e435fb64d 100644
--- a/clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp
+++ b/clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp
@@ -257,11 +257,11 @@ struct {
const char *Description;
std::function<std::unique_ptr<Command>()> Implementation;
} CommandInfo[] = {
- {"find", "Search for symbols with fuzzyFind", llvm::make_unique<FuzzyFind>},
+ {"find", "Search for symbols with fuzzyFind", std::make_unique<FuzzyFind>},
{"lookup", "Dump symbol details by ID or qualified name",
- llvm::make_unique<Lookup>},
+ std::make_unique<Lookup>},
{"refs", "Find references by ID or qualified name",
- llvm::make_unique<Refs>},
+ std::make_unique<Refs>},
};
std::unique_ptr<SymbolIndex> openIndex(llvm::StringRef Index) {
diff --git a/clang-tools-extra/clangd/indexer/IndexerMain.cpp b/clang-tools-extra/clangd/indexer/IndexerMain.cpp
index 622d29a5a1a..97d8d1283b6 100644
--- a/clang-tools-extra/clangd/indexer/IndexerMain.cpp
+++ b/clang-tools-extra/clangd/indexer/IndexerMain.cpp
@@ -120,7 +120,7 @@ int main(int argc, const char **argv) {
// Collect symbols found in each translation unit, merging as we go.
clang::clangd::IndexFileIn Data;
auto Err = Executor->get()->execute(
- llvm::make_unique<clang::clangd::IndexActionFactory>(Data),
+ std::make_unique<clang::clangd::IndexActionFactory>(Data),
clang::tooling::getStripPluginsAdjuster());
if (Err) {
llvm::errs() << llvm::toString(std::move(Err)) << "\n";
diff --git a/clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp b/clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp
index c1ece2a4232..ec11624b8ee 100644
--- a/clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp
+++ b/clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp
@@ -453,7 +453,7 @@ bool ExtractVariable::prepare(const Selection &Inputs) {
const SourceManager &SM = Inputs.AST.getSourceManager();
if (const SelectionTree::Node *N =
computeExtractedExpr(Inputs.ASTSelection.commonAncestor()))
- Target = llvm::make_unique<ExtractionContext>(N, SM, Ctx);
+ Target = std::make_unique<ExtractionContext>(N, SM, Ctx);
return Target && Target->isExtractable();
}
diff --git a/clang-tools-extra/clangd/tool/ClangdMain.cpp b/clang-tools-extra/clangd/tool/ClangdMain.cpp
index bfc7ad9c894..3b8439fee00 100644
--- a/clang-tools-extra/clangd/tool/ClangdMain.cpp
+++ b/clang-tools-extra/clangd/tool/ClangdMain.cpp
@@ -585,7 +585,7 @@ clangd accepts flags on the commandline, and in the CLANGD_FLAGS environment var
if (EnableIndex && !IndexFile.empty()) {
// Load the index asynchronously. Meanwhile SwapIndex returns no results.
SwapIndex *Placeholder;
- StaticIdx.reset(Placeholder = new SwapIndex(llvm::make_unique<MemIndex>()));
+ StaticIdx.reset(Placeholder = new SwapIndex(std::make_unique<MemIndex>()));
AsyncIndexLoad = runAsync<void>([Placeholder] {
if (auto Idx = loadIndex(IndexFile, /*UseDex=*/true))
Placeholder->reset(std::move(Idx));
@@ -641,7 +641,7 @@ clangd accepts flags on the commandline, and in the CLANGD_FLAGS environment var
if (EnableClangTidy) {
auto OverrideClangTidyOptions = tidy::ClangTidyOptions::getDefaults();
OverrideClangTidyOptions.Checks = ClangTidyChecks;
- ClangTidyOptProvider = llvm::make_unique<tidy::FileOptionsProvider>(
+ ClangTidyOptProvider = std::make_unique<tidy::FileOptionsProvider>(
tidy::ClangTidyGlobalOptions(),
/* Default */ tidy::ClangTidyOptions::getDefaults(),
/* Override */ OverrideClangTidyOptions, FSProvider.getFileSystem());
diff --git a/clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp b/clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp
index 0401aeb1923..e1cbcfd0db5 100644
--- a/clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp
+++ b/clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp
@@ -74,7 +74,7 @@ public:
return nullptr;
}
CacheHits++;
- return llvm::make_unique<IndexFileIn>(std::move(*IndexFile));
+ return std::make_unique<IndexFileIn>(std::move(*IndexFile));
}
mutable llvm::StringSet<> AccessedPaths;
@@ -575,7 +575,7 @@ TEST_F(BackgroundIndexTest, CmdLineHash) {
class BackgroundIndexRebuilderTest : public testing::Test {
protected:
BackgroundIndexRebuilderTest()
- : Target(llvm::make_unique<MemIndex>()),
+ : Target(std::make_unique<MemIndex>()),
Rebuilder(&Target, &Source, /*Threads=*/10) {
// Prepare FileSymbols with TestSymbol in it, for checkRebuild.
TestSymbol.ID = SymbolID("foo");
@@ -588,7 +588,7 @@ protected:
TestSymbol.Name = VersionStorage.back();
SymbolSlab::Builder SB;
SB.insert(TestSymbol);
- Source.update("", llvm::make_unique<SymbolSlab>(std::move(SB).build()),
+ Source.update("", std::make_unique<SymbolSlab>(std::move(SB).build()),
nullptr, nullptr, false);
// Now maybe update the index.
Action();
diff --git a/clang-tools-extra/clangd/unittests/ContextTests.cpp b/clang-tools-extra/clangd/unittests/ContextTests.cpp
index d760f4eb987..c76d565b2a2 100644
--- a/clang-tools-extra/clangd/unittests/ContextTests.cpp
+++ b/clang-tools-extra/clangd/unittests/ContextTests.cpp
@@ -26,7 +26,7 @@ TEST(ContextTests, Simple) {
TEST(ContextTests, MoveOps) {
Key<std::unique_ptr<int>> Param;
- Context Ctx = Context::empty().derive(Param, llvm::make_unique<int>(10));
+ Context Ctx = Context::empty().derive(Param, std::make_unique<int>(10));
EXPECT_EQ(**Ctx.get(Param), 10);
Context NewCtx = std::move(Ctx);
diff --git a/clang-tools-extra/clangd/unittests/FileIndexTests.cpp b/clang-tools-extra/clangd/unittests/FileIndexTests.cpp
index 044a889b066..f1f304f935e 100644
--- a/clang-tools-extra/clangd/unittests/FileIndexTests.cpp
+++ b/clang-tools-extra/clangd/unittests/FileIndexTests.cpp
@@ -67,7 +67,7 @@ std::unique_ptr<SymbolSlab> numSlab(int Begin, int End) {
SymbolSlab::Builder Slab;
for (int i = Begin; i <= End; i++)
Slab.insert(symbol(std::to_string(i)));
- return llvm::make_unique<SymbolSlab>(std::move(Slab).build());
+ return std::make_unique<SymbolSlab>(std::move(Slab).build());
}
std::unique_ptr<RefSlab> refSlab(const SymbolID &ID, const char *Path) {
@@ -76,7 +76,7 @@ std::unique_ptr<RefSlab> refSlab(const SymbolID &ID, const char *Path) {
R.Location.FileURI = Path;
R.Kind = RefKind::Reference;
Slab.insert(ID, R);
- return llvm::make_unique<RefSlab>(std::move(Slab).build());
+ return std::make_unique<RefSlab>(std::move(Slab).build());
}
TEST(FileSymbolsTest, UpdateAndGet) {
@@ -106,7 +106,7 @@ TEST(FileSymbolsTest, MergeOverlap) {
auto OneSymboSlab = [](Symbol Sym) {
SymbolSlab::Builder S;
S.insert(Sym);
- return llvm::make_unique<SymbolSlab>(std::move(S).build());
+ return std::make_unique<SymbolSlab>(std::move(S).build());
};
auto X1 = symbol("x");
X1.CanonicalDeclaration.FileURI = "file:///x1";
diff --git a/clang-tools-extra/clangd/unittests/GlobalCompilationDatabaseTests.cpp b/clang-tools-extra/clangd/unittests/GlobalCompilationDatabaseTests.cpp
index d535532ada7..6ac363c5933 100644
--- a/clang-tools-extra/clangd/unittests/GlobalCompilationDatabaseTests.cpp
+++ b/clang-tools-extra/clangd/unittests/GlobalCompilationDatabaseTests.cpp
@@ -82,7 +82,7 @@ class OverlayCDBTest : public ::testing::Test {
};
protected:
- OverlayCDBTest() : Base(llvm::make_unique<BaseCDB>()) {}
+ OverlayCDBTest() : Base(std::make_unique<BaseCDB>()) {}
std::unique_ptr<GlobalCompilationDatabase> Base;
};
diff --git a/clang-tools-extra/clangd/unittests/IndexTests.cpp b/clang-tools-extra/clangd/unittests/IndexTests.cpp
index dd6c0be73ae..b3a54896148 100644
--- a/clang-tools-extra/clangd/unittests/IndexTests.cpp
+++ b/clang-tools-extra/clangd/unittests/IndexTests.cpp
@@ -119,11 +119,11 @@ TEST(SwapIndexTest, OldIndexRecycled) {
auto Token = std::make_shared<int>();
std::weak_ptr<int> WeakToken = Token;
- SwapIndex S(llvm::make_unique<MemIndex>(SymbolSlab(), RefSlab(),
+ SwapIndex S(std::make_unique<MemIndex>(SymbolSlab(), RefSlab(),
RelationSlab(), std::move(Token),
/*BackingDataSize=*/0));
EXPECT_FALSE(WeakToken.expired()); // Current MemIndex keeps it alive.
- S.reset(llvm::make_unique<MemIndex>()); // Now the MemIndex is destroyed.
+ S.reset(std::make_unique<MemIndex>()); // Now the MemIndex is destroyed.
EXPECT_TRUE(WeakToken.expired()); // So the token is too.
}
diff --git a/clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp b/clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp
index 8caa1c5aa73..16b8ae8d677 100644
--- a/clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp
+++ b/clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp
@@ -258,7 +258,7 @@ public:
llvm::IntrusiveRefCntPtr<FileManager> Files(
new FileManager(FileSystemOptions(), InMemoryFileSystem));
- auto Factory = llvm::make_unique<SymbolIndexActionFactory>(
+ auto Factory = std::make_unique<SymbolIndexActionFactory>(
CollectorOpts, PragmaHandler.get());
std::vector<std::string> Args = {"symbol_collector", "-fsyntax-only",
diff --git a/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp b/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp
index 3daed75d5a7..5e19d370d54 100644
--- a/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp
+++ b/clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp
@@ -73,7 +73,7 @@ protected:
});
}
};
- return llvm::make_unique<CaptureDiags>();
+ return std::make_unique<CaptureDiags>();
}
/// Schedule an update and call \p CB with the diagnostics it produces, if
diff --git a/clang-tools-extra/clangd/unittests/TestTU.cpp b/clang-tools-extra/clangd/unittests/TestTU.cpp
index 7e771608706..0c1727eccad 100644
--- a/clang-tools-extra/clangd/unittests/TestTU.cpp
+++ b/clang-tools-extra/clangd/unittests/TestTU.cpp
@@ -83,7 +83,7 @@ SymbolSlab TestTU::headerSymbols() const {
std::unique_ptr<SymbolIndex> TestTU::index() const {
auto AST = build();
- auto Idx = llvm::make_unique<FileIndex>(/*UseDex=*/true);
+ auto Idx = std::make_unique<FileIndex>(/*UseDex=*/true);
Idx->updatePreamble(Filename, AST.getASTContext(), AST.getPreprocessorPtr(),
AST.getCanonicalIncludes());
Idx->updateMain(Filename, AST);
diff --git a/clang-tools-extra/clangd/xpc/XPCTransport.cpp b/clang-tools-extra/clangd/xpc/XPCTransport.cpp
index f7df8a9194d..dd4bb7028da 100644
--- a/clang-tools-extra/clangd/xpc/XPCTransport.cpp
+++ b/clang-tools-extra/clangd/xpc/XPCTransport.cpp
@@ -209,7 +209,7 @@ namespace clang {
namespace clangd {
std::unique_ptr<Transport> newXPCTransport() {
- return llvm::make_unique<XPCTransport>();
+ return std::make_unique<XPCTransport>();
}
} // namespace clangd
diff --git a/clang-tools-extra/modularize/CoverageChecker.cpp b/clang-tools-extra/modularize/CoverageChecker.cpp
index 8bcb1c75b93..af257abb523 100644
--- a/clang-tools-extra/modularize/CoverageChecker.cpp
+++ b/clang-tools-extra/modularize/CoverageChecker.cpp
@@ -105,7 +105,7 @@ class CoverageCheckerConsumer : public ASTConsumer {
public:
CoverageCheckerConsumer(CoverageChecker &Checker, Preprocessor &PP) {
// PP takes ownership.
- PP.addPPCallbacks(llvm::make_unique<CoverageCheckerCallbacks>(Checker));
+ PP.addPPCallbacks(std::make_unique<CoverageCheckerCallbacks>(Checker));
}
};
@@ -116,7 +116,7 @@ public:
protected:
std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI,
StringRef InFile) override {
- return llvm::make_unique<CoverageCheckerConsumer>(Checker,
+ return std::make_unique<CoverageCheckerConsumer>(Checker,
CI.getPreprocessor());
}
@@ -154,7 +154,7 @@ std::unique_ptr<CoverageChecker> CoverageChecker::createCoverageChecker(
StringRef ModuleMapPath, std::vector<std::string> &IncludePaths,
ArrayRef<std::string> CommandLine, clang::ModuleMap *ModuleMap) {
- return llvm::make_unique<CoverageChecker>(ModuleMapPath, IncludePaths,
+ return std::make_unique<CoverageChecker>(ModuleMapPath, IncludePaths,
CommandLine, ModuleMap);
}
diff --git a/clang-tools-extra/modularize/Modularize.cpp b/clang-tools-extra/modularize/Modularize.cpp
index 866356d055b..8d333103da3 100644
--- a/clang-tools-extra/modularize/Modularize.cpp
+++ b/clang-tools-extra/modularize/Modularize.cpp
@@ -703,7 +703,7 @@ public:
protected:
std::unique_ptr<clang::ASTConsumer>
CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override {
- return llvm::make_unique<CollectEntitiesConsumer>(
+ return std::make_unique<CollectEntitiesConsumer>(
Entities, PPTracker, CI.getPreprocessor(), InFile, HadErrors);
}
@@ -793,7 +793,7 @@ public:
protected:
std::unique_ptr<clang::ASTConsumer>
CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override {
- return llvm::make_unique<CompileCheckConsumer>();
+ return std::make_unique<CompileCheckConsumer>();
}
};
diff --git a/clang-tools-extra/modularize/PreprocessorTracker.cpp b/clang-tools-extra/modularize/PreprocessorTracker.cpp
index 445c0c161de..d54d76cbc67 100644
--- a/clang-tools-extra/modularize/PreprocessorTracker.cpp
+++ b/clang-tools-extra/modularize/PreprocessorTracker.cpp
@@ -814,7 +814,7 @@ public:
HeadersInThisCompile.clear();
assert((HeaderStack.size() == 0) && "Header stack should be empty.");
pushHeaderHandle(addHeader(rootHeaderFile));
- PP.addPPCallbacks(llvm::make_unique<PreprocessorCallbacks>(*this, PP,
+ PP.addPPCallbacks(std::make_unique<PreprocessorCallbacks>(*this, PP,
rootHeaderFile));
}
// Handle exiting a preprocessing session.
diff --git a/clang-tools-extra/pp-trace/PPTrace.cpp b/clang-tools-extra/pp-trace/PPTrace.cpp
index 67fe60bd246..fcc811c53f3 100644
--- a/clang-tools-extra/pp-trace/PPTrace.cpp
+++ b/clang-tools-extra/pp-trace/PPTrace.cpp
@@ -85,8 +85,8 @@ protected:
StringRef InFile) override {
Preprocessor &PP = CI.getPreprocessor();
PP.addPPCallbacks(
- llvm::make_unique<PPCallbacksTracker>(Filters, CallbackCalls, PP));
- return llvm::make_unique<ASTConsumer>();
+ std::make_unique<PPCallbacksTracker>(Filters, CallbackCalls, PP));
+ return std::make_unique<ASTConsumer>();
}
void EndSourceFileAction() override {
diff --git a/clang-tools-extra/unittests/clang-doc/BitcodeTest.cpp b/clang-tools-extra/unittests/clang-doc/BitcodeTest.cpp
index c2bfd6325c2..020d7dc0608 100644
--- a/clang-tools-extra/unittests/clang-doc/BitcodeTest.cpp
+++ b/clang-tools-extra/unittests/clang-doc/BitcodeTest.cpp
@@ -164,100 +164,100 @@ TEST(SerializeTest, emitInfoWithCommentBitcode) {
CommentInfo Top;
Top.Kind = "FullComment";
- Top.Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Top.Children.emplace_back(std::make_unique<CommentInfo>());
CommentInfo *BlankLine = Top.Children.back().get();
BlankLine->Kind = "ParagraphComment";
- BlankLine->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ BlankLine->Children.emplace_back(std::make_unique<CommentInfo>());
BlankLine->Children.back()->Kind = "TextComment";
- Top.Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Top.Children.emplace_back(std::make_unique<CommentInfo>());
CommentInfo *Brief = Top.Children.back().get();
Brief->Kind = "ParagraphComment";
- Brief->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Brief->Children.emplace_back(std::make_unique<CommentInfo>());
Brief->Children.back()->Kind = "TextComment";
Brief->Children.back()->Name = "ParagraphComment";
Brief->Children.back()->Text = " Brief description.";
- Top.Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Top.Children.emplace_back(std::make_unique<CommentInfo>());
CommentInfo *Extended = Top.Children.back().get();
Extended->Kind = "ParagraphComment";
- Extended->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Extended->Children.emplace_back(std::make_unique<CommentInfo>());
Extended->Children.back()->Kind = "TextComment";
Extended->Children.back()->Text = " Extended description that";
- Extended->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Extended->Children.emplace_back(std::make_unique<CommentInfo>());
Extended->Children.back()->Kind = "TextComment";
Extended->Children.back()->Text = " continues onto the next line.";
- Top.Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Top.Children.emplace_back(std::make_unique<CommentInfo>());
CommentInfo *HTML = Top.Children.back().get();
HTML->Kind = "ParagraphComment";
- HTML->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ HTML->Children.emplace_back(std::make_unique<CommentInfo>());
HTML->Children.back()->Kind = "TextComment";
- HTML->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ HTML->Children.emplace_back(std::make_unique<CommentInfo>());
HTML->Children.back()->Kind = "HTMLStartTagComment";
HTML->Children.back()->Name = "ul";
HTML->Children.back()->AttrKeys.emplace_back("class");
HTML->Children.back()->AttrValues.emplace_back("test");
- HTML->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ HTML->Children.emplace_back(std::make_unique<CommentInfo>());
HTML->Children.back()->Kind = "HTMLStartTagComment";
HTML->Children.back()->Name = "li";
- HTML->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ HTML->Children.emplace_back(std::make_unique<CommentInfo>());
HTML->Children.back()->Kind = "TextComment";
HTML->Children.back()->Text = " Testing.";
- HTML->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ HTML->Children.emplace_back(std::make_unique<CommentInfo>());
HTML->Children.back()->Kind = "HTMLEndTagComment";
HTML->Children.back()->Name = "ul";
HTML->Children.back()->SelfClosing = true;
- Top.Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Top.Children.emplace_back(std::make_unique<CommentInfo>());
CommentInfo *Verbatim = Top.Children.back().get();
Verbatim->Kind = "VerbatimBlockComment";
Verbatim->Name = "verbatim";
Verbatim->CloseName = "endverbatim";
- Verbatim->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Verbatim->Children.emplace_back(std::make_unique<CommentInfo>());
Verbatim->Children.back()->Kind = "VerbatimBlockLineComment";
Verbatim->Children.back()->Text = " The description continues.";
- Top.Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Top.Children.emplace_back(std::make_unique<CommentInfo>());
CommentInfo *ParamOut = Top.Children.back().get();
ParamOut->Kind = "ParamCommandComment";
ParamOut->Direction = "[out]";
ParamOut->ParamName = "I";
ParamOut->Explicit = true;
- ParamOut->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ ParamOut->Children.emplace_back(std::make_unique<CommentInfo>());
ParamOut->Children.back()->Kind = "ParagraphComment";
ParamOut->Children.back()->Children.emplace_back(
- llvm::make_unique<CommentInfo>());
+ std::make_unique<CommentInfo>());
ParamOut->Children.back()->Children.back()->Kind = "TextComment";
ParamOut->Children.back()->Children.emplace_back(
- llvm::make_unique<CommentInfo>());
+ std::make_unique<CommentInfo>());
ParamOut->Children.back()->Children.back()->Kind = "TextComment";
ParamOut->Children.back()->Children.back()->Text = " is a parameter.";
- Top.Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Top.Children.emplace_back(std::make_unique<CommentInfo>());
CommentInfo *ParamIn = Top.Children.back().get();
ParamIn->Kind = "ParamCommandComment";
ParamIn->Direction = "[in]";
ParamIn->ParamName = "J";
- ParamIn->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ ParamIn->Children.emplace_back(std::make_unique<CommentInfo>());
ParamIn->Children.back()->Kind = "ParagraphComment";
ParamIn->Children.back()->Children.emplace_back(
- llvm::make_unique<CommentInfo>());
+ std::make_unique<CommentInfo>());
ParamIn->Children.back()->Children.back()->Kind = "TextComment";
ParamIn->Children.back()->Children.back()->Text = " is a parameter.";
ParamIn->Children.back()->Children.emplace_back(
- llvm::make_unique<CommentInfo>());
+ std::make_unique<CommentInfo>());
ParamIn->Children.back()->Children.back()->Kind = "TextComment";
- Top.Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Top.Children.emplace_back(std::make_unique<CommentInfo>());
CommentInfo *Return = Top.Children.back().get();
Return->Kind = "BlockCommandComment";
Return->Name = "return";
Return->Explicit = true;
- Return->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Return->Children.emplace_back(std::make_unique<CommentInfo>());
Return->Children.back()->Kind = "ParagraphComment";
Return->Children.back()->Children.emplace_back(
- llvm::make_unique<CommentInfo>());
+ std::make_unique<CommentInfo>());
Return->Children.back()->Children.back()->Kind = "TextComment";
Return->Children.back()->Children.back()->Text = "void";
diff --git a/clang-tools-extra/unittests/clang-doc/GeneratorTest.cpp b/clang-tools-extra/unittests/clang-doc/GeneratorTest.cpp
index c110345c1c5..932a5aed314 100644
--- a/clang-tools-extra/unittests/clang-doc/GeneratorTest.cpp
+++ b/clang-tools-extra/unittests/clang-doc/GeneratorTest.cpp
@@ -17,21 +17,21 @@ namespace doc {
TEST(GeneratorTest, emitIndex) {
Index Idx;
- auto InfoA = llvm::make_unique<Info>();
+ auto InfoA = std::make_unique<Info>();
InfoA->Name = "A";
InfoA->USR = serialize::hashUSR("1");
Generator::addInfoToIndex(Idx, InfoA.get());
- auto InfoC = llvm::make_unique<Info>();
+ auto InfoC = std::make_unique<Info>();
InfoC->Name = "C";
InfoC->USR = serialize::hashUSR("3");
Reference RefB = Reference("B");
RefB.USR = serialize::hashUSR("2");
InfoC->Namespace = {std::move(RefB)};
Generator::addInfoToIndex(Idx, InfoC.get());
- auto InfoD = llvm::make_unique<Info>();
+ auto InfoD = std::make_unique<Info>();
InfoD->Name = "D";
InfoD->USR = serialize::hashUSR("4");
- auto InfoF = llvm::make_unique<Info>();
+ auto InfoF = std::make_unique<Info>();
InfoF->Name = "F";
InfoF->USR = serialize::hashUSR("6");
Reference RefD = Reference("D");
@@ -40,7 +40,7 @@ TEST(GeneratorTest, emitIndex) {
RefE.USR = serialize::hashUSR("5");
InfoF->Namespace = {std::move(RefE), std::move(RefD)};
Generator::addInfoToIndex(Idx, InfoF.get());
- auto InfoG = llvm::make_unique<Info>(InfoType::IT_namespace);
+ auto InfoG = std::make_unique<Info>(InfoType::IT_namespace);
Generator::addInfoToIndex(Idx, InfoG.get());
Index ExpectedIdx;
diff --git a/clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp b/clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp
index 901b75a706b..5d66d981d63 100644
--- a/clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp
+++ b/clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp
@@ -335,34 +335,34 @@ TEST(HTMLGeneratorTest, emitCommentHTML) {
CommentInfo Top;
Top.Kind = "FullComment";
- Top.Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Top.Children.emplace_back(std::make_unique<CommentInfo>());
CommentInfo *BlankLine = Top.Children.back().get();
BlankLine->Kind = "ParagraphComment";
- BlankLine->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ BlankLine->Children.emplace_back(std::make_unique<CommentInfo>());
BlankLine->Children.back()->Kind = "TextComment";
- Top.Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Top.Children.emplace_back(std::make_unique<CommentInfo>());
CommentInfo *Brief = Top.Children.back().get();
Brief->Kind = "ParagraphComment";
- Brief->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Brief->Children.emplace_back(std::make_unique<CommentInfo>());
Brief->Children.back()->Kind = "TextComment";
Brief->Children.back()->Name = "ParagraphComment";
Brief->Children.back()->Text = " Brief description.";
- Top.Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Top.Children.emplace_back(std::make_unique<CommentInfo>());
CommentInfo *Extended = Top.Children.back().get();
Extended->Kind = "ParagraphComment";
- Extended->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Extended->Children.emplace_back(std::make_unique<CommentInfo>());
Extended->Children.back()->Kind = "TextComment";
Extended->Children.back()->Text = " Extended description that";
- Extended->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Extended->Children.emplace_back(std::make_unique<CommentInfo>());
Extended->Children.back()->Kind = "TextComment";
Extended->Children.back()->Text = " continues onto the next line.";
- Top.Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Top.Children.emplace_back(std::make_unique<CommentInfo>());
CommentInfo *Entities = Top.Children.back().get();
Entities->Kind = "ParagraphComment";
- Entities->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Entities->Children.emplace_back(std::make_unique<CommentInfo>());
Entities->Children.back()->Kind = "TextComment";
Entities->Children.back()->Name = "ParagraphComment";
Entities->Children.back()->Text =
diff --git a/clang-tools-extra/unittests/clang-doc/MDGeneratorTest.cpp b/clang-tools-extra/unittests/clang-doc/MDGeneratorTest.cpp
index 3a35108fadf..1121782024d 100644
--- a/clang-tools-extra/unittests/clang-doc/MDGeneratorTest.cpp
+++ b/clang-tools-extra/unittests/clang-doc/MDGeneratorTest.cpp
@@ -217,100 +217,100 @@ TEST(MDGeneratorTest, emitCommentMD) {
CommentInfo Top;
Top.Kind = "FullComment";
- Top.Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Top.Children.emplace_back(std::make_unique<CommentInfo>());
CommentInfo *BlankLine = Top.Children.back().get();
BlankLine->Kind = "ParagraphComment";
- BlankLine->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ BlankLine->Children.emplace_back(std::make_unique<CommentInfo>());
BlankLine->Children.back()->Kind = "TextComment";
- Top.Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Top.Children.emplace_back(std::make_unique<CommentInfo>());
CommentInfo *Brief = Top.Children.back().get();
Brief->Kind = "ParagraphComment";
- Brief->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Brief->Children.emplace_back(std::make_unique<CommentInfo>());
Brief->Children.back()->Kind = "TextComment";
Brief->Children.back()->Name = "ParagraphComment";
Brief->Children.back()->Text = " Brief description.";
- Top.Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Top.Children.emplace_back(std::make_unique<CommentInfo>());
CommentInfo *Extended = Top.Children.back().get();
Extended->Kind = "ParagraphComment";
- Extended->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Extended->Children.emplace_back(std::make_unique<CommentInfo>());
Extended->Children.back()->Kind = "TextComment";
Extended->Children.back()->Text = " Extended description that";
- Extended->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Extended->Children.emplace_back(std::make_unique<CommentInfo>());
Extended->Children.back()->Kind = "TextComment";
Extended->Children.back()->Text = " continues onto the next line.";
- Top.Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Top.Children.emplace_back(std::make_unique<CommentInfo>());
CommentInfo *HTML = Top.Children.back().get();
HTML->Kind = "ParagraphComment";
- HTML->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ HTML->Children.emplace_back(std::make_unique<CommentInfo>());
HTML->Children.back()->Kind = "TextComment";
- HTML->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ HTML->Children.emplace_back(std::make_unique<CommentInfo>());
HTML->Children.back()->Kind = "HTMLStartTagComment";
HTML->Children.back()->Name = "ul";
HTML->Children.back()->AttrKeys.emplace_back("class");
HTML->Children.back()->AttrValues.emplace_back("test");
- HTML->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ HTML->Children.emplace_back(std::make_unique<CommentInfo>());
HTML->Children.back()->Kind = "HTMLStartTagComment";
HTML->Children.back()->Name = "li";
- HTML->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ HTML->Children.emplace_back(std::make_unique<CommentInfo>());
HTML->Children.back()->Kind = "TextComment";
HTML->Children.back()->Text = " Testing.";
- HTML->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ HTML->Children.emplace_back(std::make_unique<CommentInfo>());
HTML->Children.back()->Kind = "HTMLEndTagComment";
HTML->Children.back()->Name = "ul";
HTML->Children.back()->SelfClosing = true;
- Top.Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Top.Children.emplace_back(std::make_unique<CommentInfo>());
CommentInfo *Verbatim = Top.Children.back().get();
Verbatim->Kind = "VerbatimBlockComment";
Verbatim->Name = "verbatim";
Verbatim->CloseName = "endverbatim";
- Verbatim->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Verbatim->Children.emplace_back(std::make_unique<CommentInfo>());
Verbatim->Children.back()->Kind = "VerbatimBlockLineComment";
Verbatim->Children.back()->Text = " The description continues.";
- Top.Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Top.Children.emplace_back(std::make_unique<CommentInfo>());
CommentInfo *ParamOut = Top.Children.back().get();
ParamOut->Kind = "ParamCommandComment";
ParamOut->Direction = "[out]";
ParamOut->ParamName = "I";
ParamOut->Explicit = true;
- ParamOut->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ ParamOut->Children.emplace_back(std::make_unique<CommentInfo>());
ParamOut->Children.back()->Kind = "ParagraphComment";
ParamOut->Children.back()->Children.emplace_back(
- llvm::make_unique<CommentInfo>());
+ std::make_unique<CommentInfo>());
ParamOut->Children.back()->Children.back()->Kind = "TextComment";
ParamOut->Children.back()->Children.emplace_back(
- llvm::make_unique<CommentInfo>());
+ std::make_unique<CommentInfo>());
ParamOut->Children.back()->Children.back()->Kind = "TextComment";
ParamOut->Children.back()->Children.back()->Text = " is a parameter.";
- Top.Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Top.Children.emplace_back(std::make_unique<CommentInfo>());
CommentInfo *ParamIn = Top.Children.back().get();
ParamIn->Kind = "ParamCommandComment";
ParamIn->Direction = "[in]";
ParamIn->ParamName = "J";
- ParamIn->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ ParamIn->Children.emplace_back(std::make_unique<CommentInfo>());
ParamIn->Children.back()->Kind = "ParagraphComment";
ParamIn->Children.back()->Children.emplace_back(
- llvm::make_unique<CommentInfo>());
+ std::make_unique<CommentInfo>());
ParamIn->Children.back()->Children.back()->Kind = "TextComment";
ParamIn->Children.back()->Children.back()->Text = " is a parameter.";
ParamIn->Children.back()->Children.emplace_back(
- llvm::make_unique<CommentInfo>());
+ std::make_unique<CommentInfo>());
ParamIn->Children.back()->Children.back()->Kind = "TextComment";
- Top.Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Top.Children.emplace_back(std::make_unique<CommentInfo>());
CommentInfo *Return = Top.Children.back().get();
Return->Kind = "BlockCommandComment";
Return->Name = "return";
Return->Explicit = true;
- Return->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Return->Children.emplace_back(std::make_unique<CommentInfo>());
Return->Children.back()->Kind = "ParagraphComment";
Return->Children.back()->Children.emplace_back(
- llvm::make_unique<CommentInfo>());
+ std::make_unique<CommentInfo>());
Return->Children.back()->Children.back()->Kind = "TextComment";
Return->Children.back()->Children.back()->Text = "void";
diff --git a/clang-tools-extra/unittests/clang-doc/MergeTest.cpp b/clang-tools-extra/unittests/clang-doc/MergeTest.cpp
index 89c68dd823a..7f738734dbd 100644
--- a/clang-tools-extra/unittests/clang-doc/MergeTest.cpp
+++ b/clang-tools-extra/unittests/clang-doc/MergeTest.cpp
@@ -43,10 +43,10 @@ TEST(MergeTest, mergeNamespaceInfos) {
Two.ChildEnums.back().Name = "TwoEnum";
std::vector<std::unique_ptr<Info>> Infos;
- Infos.emplace_back(llvm::make_unique<NamespaceInfo>(std::move(One)));
- Infos.emplace_back(llvm::make_unique<NamespaceInfo>(std::move(Two)));
+ Infos.emplace_back(std::make_unique<NamespaceInfo>(std::move(One)));
+ Infos.emplace_back(std::make_unique<NamespaceInfo>(std::move(Two)));
- auto Expected = llvm::make_unique<NamespaceInfo>();
+ auto Expected = std::make_unique<NamespaceInfo>();
Expected->Name = "Namespace";
Expected->Namespace.emplace_back(EmptySID, "A", InfoType::IT_namespace);
@@ -112,10 +112,10 @@ TEST(MergeTest, mergeRecordInfos) {
Two.ChildEnums.back().Name = "TwoEnum";
std::vector<std::unique_ptr<Info>> Infos;
- Infos.emplace_back(llvm::make_unique<RecordInfo>(std::move(One)));
- Infos.emplace_back(llvm::make_unique<RecordInfo>(std::move(Two)));
+ Infos.emplace_back(std::make_unique<RecordInfo>(std::move(One)));
+ Infos.emplace_back(std::make_unique<RecordInfo>(std::move(Two)));
- auto Expected = llvm::make_unique<RecordInfo>();
+ auto Expected = std::make_unique<RecordInfo>();
Expected->Name = "r";
Expected->Namespace.emplace_back(EmptySID, "A", InfoType::IT_namespace);
@@ -160,9 +160,9 @@ TEST(MergeTest, mergeFunctionInfos) {
One.Description.emplace_back();
auto OneFullComment = &One.Description.back();
OneFullComment->Kind = "FullComment";
- auto OneParagraphComment = llvm::make_unique<CommentInfo>();
+ auto OneParagraphComment = std::make_unique<CommentInfo>();
OneParagraphComment->Kind = "ParagraphComment";
- auto OneTextComment = llvm::make_unique<CommentInfo>();
+ auto OneTextComment = std::make_unique<CommentInfo>();
OneTextComment->Kind = "TextComment";
OneTextComment->Text = "This is a text comment.";
OneParagraphComment->Children.push_back(std::move(OneTextComment));
@@ -180,19 +180,19 @@ TEST(MergeTest, mergeFunctionInfos) {
Two.Description.emplace_back();
auto TwoFullComment = &Two.Description.back();
TwoFullComment->Kind = "FullComment";
- auto TwoParagraphComment = llvm::make_unique<CommentInfo>();
+ auto TwoParagraphComment = std::make_unique<CommentInfo>();
TwoParagraphComment->Kind = "ParagraphComment";
- auto TwoTextComment = llvm::make_unique<CommentInfo>();
+ auto TwoTextComment = std::make_unique<CommentInfo>();
TwoTextComment->Kind = "TextComment";
TwoTextComment->Text = "This is a text comment.";
TwoParagraphComment->Children.push_back(std::move(TwoTextComment));
TwoFullComment->Children.push_back(std::move(TwoParagraphComment));
std::vector<std::unique_ptr<Info>> Infos;
- Infos.emplace_back(llvm::make_unique<FunctionInfo>(std::move(One)));
- Infos.emplace_back(llvm::make_unique<FunctionInfo>(std::move(Two)));
+ Infos.emplace_back(std::make_unique<FunctionInfo>(std::move(One)));
+ Infos.emplace_back(std::make_unique<FunctionInfo>(std::move(Two)));
- auto Expected = llvm::make_unique<FunctionInfo>();
+ auto Expected = std::make_unique<FunctionInfo>();
Expected->Name = "f";
Expected->Namespace.emplace_back(EmptySID, "A", InfoType::IT_namespace);
@@ -207,9 +207,9 @@ TEST(MergeTest, mergeFunctionInfos) {
Expected->Description.emplace_back();
auto ExpectedFullComment = &Expected->Description.back();
ExpectedFullComment->Kind = "FullComment";
- auto ExpectedParagraphComment = llvm::make_unique<CommentInfo>();
+ auto ExpectedParagraphComment = std::make_unique<CommentInfo>();
ExpectedParagraphComment->Kind = "ParagraphComment";
- auto ExpectedTextComment = llvm::make_unique<CommentInfo>();
+ auto ExpectedTextComment = std::make_unique<CommentInfo>();
ExpectedTextComment->Kind = "TextComment";
ExpectedTextComment->Text = "This is a text comment.";
ExpectedParagraphComment->Children.push_back(std::move(ExpectedTextComment));
@@ -241,10 +241,10 @@ TEST(MergeTest, mergeEnumInfos) {
Two.Members.emplace_back("Y");
std::vector<std::unique_ptr<Info>> Infos;
- Infos.emplace_back(llvm::make_unique<EnumInfo>(std::move(One)));
- Infos.emplace_back(llvm::make_unique<EnumInfo>(std::move(Two)));
+ Infos.emplace_back(std::make_unique<EnumInfo>(std::move(One)));
+ Infos.emplace_back(std::make_unique<EnumInfo>(std::move(Two)));
- auto Expected = llvm::make_unique<EnumInfo>();
+ auto Expected = std::make_unique<EnumInfo>();
Expected->Name = "e";
Expected->Namespace.emplace_back(EmptySID, "A", InfoType::IT_namespace);
diff --git a/clang-tools-extra/unittests/clang-doc/YAMLGeneratorTest.cpp b/clang-tools-extra/unittests/clang-doc/YAMLGeneratorTest.cpp
index efc08fdc21a..449bb5abf46 100644
--- a/clang-tools-extra/unittests/clang-doc/YAMLGeneratorTest.cpp
+++ b/clang-tools-extra/unittests/clang-doc/YAMLGeneratorTest.cpp
@@ -246,100 +246,100 @@ TEST(YAMLGeneratorTest, emitCommentYAML) {
CommentInfo Top;
Top.Kind = "FullComment";
- Top.Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Top.Children.emplace_back(std::make_unique<CommentInfo>());
CommentInfo *BlankLine = Top.Children.back().get();
BlankLine->Kind = "ParagraphComment";
- BlankLine->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ BlankLine->Children.emplace_back(std::make_unique<CommentInfo>());
BlankLine->Children.back()->Kind = "TextComment";
- Top.Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Top.Children.emplace_back(std::make_unique<CommentInfo>());
CommentInfo *Brief = Top.Children.back().get();
Brief->Kind = "ParagraphComment";
- Brief->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Brief->Children.emplace_back(std::make_unique<CommentInfo>());
Brief->Children.back()->Kind = "TextComment";
Brief->Children.back()->Name = "ParagraphComment";
Brief->Children.back()->Text = " Brief description.";
- Top.Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Top.Children.emplace_back(std::make_unique<CommentInfo>());
CommentInfo *Extended = Top.Children.back().get();
Extended->Kind = "ParagraphComment";
- Extended->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Extended->Children.emplace_back(std::make_unique<CommentInfo>());
Extended->Children.back()->Kind = "TextComment";
Extended->Children.back()->Text = " Extended description that";
- Extended->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Extended->Children.emplace_back(std::make_unique<CommentInfo>());
Extended->Children.back()->Kind = "TextComment";
Extended->Children.back()->Text = " continues onto the next line.";
- Top.Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Top.Children.emplace_back(std::make_unique<CommentInfo>());
CommentInfo *HTML = Top.Children.back().get();
HTML->Kind = "ParagraphComment";
- HTML->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ HTML->Children.emplace_back(std::make_unique<CommentInfo>());
HTML->Children.back()->Kind = "TextComment";
- HTML->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ HTML->Children.emplace_back(std::make_unique<CommentInfo>());
HTML->Children.back()->Kind = "HTMLStartTagComment";
HTML->Children.back()->Name = "ul";
HTML->Children.back()->AttrKeys.emplace_back("class");
HTML->Children.back()->AttrValues.emplace_back("test");
- HTML->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ HTML->Children.emplace_back(std::make_unique<CommentInfo>());
HTML->Children.back()->Kind = "HTMLStartTagComment";
HTML->Children.back()->Name = "li";
- HTML->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ HTML->Children.emplace_back(std::make_unique<CommentInfo>());
HTML->Children.back()->Kind = "TextComment";
HTML->Children.back()->Text = " Testing.";
- HTML->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ HTML->Children.emplace_back(std::make_unique<CommentInfo>());
HTML->Children.back()->Kind = "HTMLEndTagComment";
HTML->Children.back()->Name = "ul";
HTML->Children.back()->SelfClosing = true;
- Top.Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Top.Children.emplace_back(std::make_unique<CommentInfo>());
CommentInfo *Verbatim = Top.Children.back().get();
Verbatim->Kind = "VerbatimBlockComment";
Verbatim->Name = "verbatim";
Verbatim->CloseName = "endverbatim";
- Verbatim->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Verbatim->Children.emplace_back(std::make_unique<CommentInfo>());
Verbatim->Children.back()->Kind = "VerbatimBlockLineComment";
Verbatim->Children.back()->Text = " The description continues.";
- Top.Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Top.Children.emplace_back(std::make_unique<CommentInfo>());
CommentInfo *ParamOut = Top.Children.back().get();
ParamOut->Kind = "ParamCommandComment";
ParamOut->Direction = "[out]";
ParamOut->ParamName = "I";
ParamOut->Explicit = true;
- ParamOut->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ ParamOut->Children.emplace_back(std::make_unique<CommentInfo>());
ParamOut->Children.back()->Kind = "ParagraphComment";
ParamOut->Children.back()->Children.emplace_back(
- llvm::make_unique<CommentInfo>());
+ std::make_unique<CommentInfo>());
ParamOut->Children.back()->Children.back()->Kind = "TextComment";
ParamOut->Children.back()->Children.emplace_back(
- llvm::make_unique<CommentInfo>());
+ std::make_unique<CommentInfo>());
ParamOut->Children.back()->Children.back()->Kind = "TextComment";
ParamOut->Children.back()->Children.back()->Text = " is a parameter.";
- Top.Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Top.Children.emplace_back(std::make_unique<CommentInfo>());
CommentInfo *ParamIn = Top.Children.back().get();
ParamIn->Kind = "ParamCommandComment";
ParamIn->Direction = "[in]";
ParamIn->ParamName = "J";
- ParamIn->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ ParamIn->Children.emplace_back(std::make_unique<CommentInfo>());
ParamIn->Children.back()->Kind = "ParagraphComment";
ParamIn->Children.back()->Children.emplace_back(
- llvm::make_unique<CommentInfo>());
+ std::make_unique<CommentInfo>());
ParamIn->Children.back()->Children.back()->Kind = "TextComment";
ParamIn->Children.back()->Children.back()->Text = " is a parameter.";
ParamIn->Children.back()->Children.emplace_back(
- llvm::make_unique<CommentInfo>());
+ std::make_unique<CommentInfo>());
ParamIn->Children.back()->Children.back()->Kind = "TextComment";
- Top.Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Top.Children.emplace_back(std::make_unique<CommentInfo>());
CommentInfo *Return = Top.Children.back().get();
Return->Kind = "BlockCommandComment";
Return->Name = "return";
Return->Explicit = true;
- Return->Children.emplace_back(llvm::make_unique<CommentInfo>());
+ Return->Children.emplace_back(std::make_unique<CommentInfo>());
Return->Children.back()->Kind = "ParagraphComment";
Return->Children.back()->Children.emplace_back(
- llvm::make_unique<CommentInfo>());
+ std::make_unique<CommentInfo>());
Return->Children.back()->Children.back()->Kind = "TextComment";
Return->Children.back()->Children.back()->Text = "void";
diff --git a/clang-tools-extra/unittests/clang-include-fixer/IncludeFixerTest.cpp b/clang-tools-extra/unittests/clang-include-fixer/IncludeFixerTest.cpp
index ab7ef7973a7..b21017160a2 100644
--- a/clang-tools-extra/unittests/clang-include-fixer/IncludeFixerTest.cpp
+++ b/clang-tools-extra/unittests/clang-include-fixer/IncludeFixerTest.cpp
@@ -92,9 +92,9 @@ static std::string runIncludeFixer(
{SymbolInfo("foo2", SymbolInfo::SymbolKind::Class, "\"foo2.h\"", {}),
SymbolInfo::Signals{}},
};
- auto SymbolIndexMgr = llvm::make_unique<SymbolIndexManager>();
+ auto SymbolIndexMgr = std::make_unique<SymbolIndexManager>();
SymbolIndexMgr->addSymbolIndex(
- [=]() { return llvm::make_unique<InMemorySymbolIndex>(Symbols); });
+ [=]() { return std::make_unique<InMemorySymbolIndex>(Symbols); });
std::vector<IncludeFixerContext> FixerContexts;
IncludeFixerActionFactory Factory(*SymbolIndexMgr, FixerContexts, "llvm");
diff --git a/clang-tools-extra/unittests/clang-move/ClangMoveTests.cpp b/clang-tools-extra/unittests/clang-move/ClangMoveTests.cpp
index 721ffd95237..75a9826baf7 100644
--- a/clang-tools-extra/unittests/clang-move/ClangMoveTests.cpp
+++ b/clang-tools-extra/unittests/clang-move/ClangMoveTests.cpp
@@ -227,7 +227,7 @@ runClangMoveOnCode(const move::MoveDefinitionSpec &Spec,
ClangMoveContext MoveContext = {Spec, FileToReplacements, WorkingDir, "LLVM",
Reporter != nullptr};
- auto Factory = llvm::make_unique<clang::move::ClangMoveActionFactory>(
+ auto Factory = std::make_unique<clang::move::ClangMoveActionFactory>(
&MoveContext, Reporter);
// std::string IncludeArg = Twine("-I" + WorkingDir;
diff --git a/clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h b/clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h
index d1180d4ebfd..787679c68a3 100644
--- a/clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h
+++ b/clang-tools-extra/unittests/clang-tidy/ClangTidyTest.h
@@ -40,7 +40,7 @@ template <typename Check> struct CheckFactory<Check> {
static void
createChecks(ClangTidyContext *Context,
SmallVectorImpl<std::unique_ptr<ClangTidyCheck>> &Result) {
- Result.emplace_back(llvm::make_unique<Check>(
+ Result.emplace_back(std::make_unique<Check>(
"test-check-" + std::to_string(Result.size()), Context));
}
};
@@ -88,7 +88,7 @@ runCheckOnCode(StringRef Code, std::vector<ClangTidyError> *Errors = nullptr,
std::map<StringRef, StringRef>()) {
ClangTidyOptions Options = ExtraOptions;
Options.Checks = "*";
- ClangTidyContext Context(llvm::make_unique<DefaultOptionsProvider>(
+ ClangTidyContext Context(std::make_unique<DefaultOptionsProvider>(
ClangTidyGlobalOptions(), Options));
ClangTidyDiagnosticConsumer DiagConsumer(Context);
DiagnosticsEngine DE(new DiagnosticIDs(), new DiagnosticOptions,
diff --git a/clang-tools-extra/unittests/clang-tidy/IncludeInserterTest.cpp b/clang-tools-extra/unittests/clang-tidy/IncludeInserterTest.cpp
index 89b25671374..890599cbc97 100644
--- a/clang-tools-extra/unittests/clang-tidy/IncludeInserterTest.cpp
+++ b/clang-tools-extra/unittests/clang-tidy/IncludeInserterTest.cpp
@@ -33,7 +33,7 @@ public:
void registerPPCallbacks(const SourceManager &SM, Preprocessor *PP,
Preprocessor *ModuleExpanderPP) override {
- Inserter = llvm::make_unique<utils::IncludeInserter>(
+ Inserter = std::make_unique<utils::IncludeInserter>(
SM, getLangOpts(), utils::IncludeSorter::IS_Google);
PP->addPPCallbacks(Inserter->CreatePPCallbacks());
}
OpenPOWER on IntegriCloud