Skip to content

Commit 2b3d49b

Browse files
committed
[Clang] Migrate llvm::make_unique to std::make_unique
Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. Differential revision: https://reviews.llvm.org/D66259 llvm-svn: 368942
1 parent 5cd312d commit 2b3d49b

File tree

259 files changed

+831
-831
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

259 files changed

+831
-831
lines changed

clang/examples/AnnotateFunctions/AnnotateFunctions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class AnnotateFunctionsAction : public PluginASTAction {
4141
public:
4242
std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI,
4343
llvm::StringRef) override {
44-
return llvm::make_unique<AnnotateFunctionsConsumer>();
44+
return std::make_unique<AnnotateFunctionsConsumer>();
4545
}
4646

4747
bool ParseArgs(const CompilerInstance &CI,

clang/examples/PrintFunctionNames/PrintFunctionNames.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class PrintFunctionNamesAction : public PluginASTAction {
8181
protected:
8282
std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI,
8383
llvm::StringRef) override {
84-
return llvm::make_unique<PrintFunctionsConsumer>(CI, ParsedTemplates);
84+
return std::make_unique<PrintFunctionsConsumer>(CI, ParsedTemplates);
8585
}
8686

8787
bool ParseArgs(const CompilerInstance &CI,

clang/examples/clang-interpreter/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class SimpleJIT {
5858
IRCompileLayer CompileLayer{ES, ObjectLayer, SimpleCompiler(*TM)};
5959

6060
static std::unique_ptr<SectionMemoryManager> createMemMgr() {
61-
return llvm::make_unique<SectionMemoryManager>();
61+
return std::make_unique<SectionMemoryManager>();
6262
}
6363

6464
SimpleJIT(

clang/include/clang/AST/ASTImporterSharedState.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class ASTImporterSharedState {
4747
ASTImporterSharedState() = default;
4848

4949
ASTImporterSharedState(TranslationUnitDecl &ToTU) {
50-
LookupTable = llvm::make_unique<ASTImporterLookupTable>(ToTU);
50+
LookupTable = std::make_unique<ASTImporterLookupTable>(ToTU);
5151
}
5252

5353
ASTImporterLookupTable *getLookupTable() { return LookupTable.get(); }

clang/include/clang/Basic/SyncScope.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ AtomicScopeModel::create(AtomicScopeModelKind K) {
144144
case AtomicScopeModelKind::None:
145145
return std::unique_ptr<AtomicScopeModel>{};
146146
case AtomicScopeModelKind::OpenCL:
147-
return llvm::make_unique<AtomicScopeOpenCLModel>();
147+
return std::make_unique<AtomicScopeOpenCLModel>();
148148
}
149149
llvm_unreachable("Invalid atomic scope model kind");
150150
}

clang/include/clang/Frontend/ASTUnit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ class ASTUnit {
315315

316316
CodeCompletionTUInfo &getCodeCompletionTUInfo() {
317317
if (!CCTUInfo)
318-
CCTUInfo = llvm::make_unique<CodeCompletionTUInfo>(
318+
CCTUInfo = std::make_unique<CodeCompletionTUInfo>(
319319
std::make_shared<GlobalCodeCompletionAllocator>());
320320
return *CCTUInfo;
321321
}

clang/include/clang/Lex/Preprocessor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,7 @@ class Preprocessor {
994994
PPCallbacks *getPPCallbacks() const { return Callbacks.get(); }
995995
void addPPCallbacks(std::unique_ptr<PPCallbacks> C) {
996996
if (Callbacks)
997-
C = llvm::make_unique<PPChainedCallbacks>(std::move(C),
997+
C = std::make_unique<PPChainedCallbacks>(std::move(C),
998998
std::move(Callbacks));
999999
Callbacks = std::move(C);
10001000
}
@@ -1471,7 +1471,7 @@ class Preprocessor {
14711471
if (LexLevel) {
14721472
// It's not correct in general to enter caching lex mode while in the
14731473
// middle of a nested lexing action.
1474-
auto TokCopy = llvm::make_unique<Token[]>(1);
1474+
auto TokCopy = std::make_unique<Token[]>(1);
14751475
TokCopy[0] = Tok;
14761476
EnterTokenStream(std::move(TokCopy), 1, true, IsReinject);
14771477
} else {

clang/include/clang/Sema/SemaInternal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class TypoCorrectionConsumer : public VisibleDeclConsumer {
9797
bool EnteringContext)
9898
: Typo(TypoName.getName().getAsIdentifierInfo()), CurrentTCIndex(0),
9999
SavedTCIndex(0), SemaRef(SemaRef), S(S),
100-
SS(SS ? llvm::make_unique<CXXScopeSpec>(*SS) : nullptr),
100+
SS(SS ? std::make_unique<CXXScopeSpec>(*SS) : nullptr),
101101
CorrectionValidator(std::move(CCC)), MemberContext(MemberContext),
102102
Result(SemaRef, TypoName, LookupKind),
103103
Namespaces(SemaRef.Context, SemaRef.CurContext, SS),

clang/include/clang/Sema/TypoCorrection.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ class DefaultFilterCCC final : public CorrectionCandidateCallback {
356356
: CorrectionCandidateCallback(Typo, TypoNNS) {}
357357

358358
std::unique_ptr<CorrectionCandidateCallback> clone() override {
359-
return llvm::make_unique<DefaultFilterCCC>(*this);
359+
return std::make_unique<DefaultFilterCCC>(*this);
360360
}
361361
};
362362

@@ -369,7 +369,7 @@ class DeclFilterCCC final : public CorrectionCandidateCallback {
369369
return candidate.getCorrectionDeclAs<C>();
370370
}
371371
std::unique_ptr<CorrectionCandidateCallback> clone() override {
372-
return llvm::make_unique<DeclFilterCCC>(*this);
372+
return std::make_unique<DeclFilterCCC>(*this);
373373
}
374374
};
375375

@@ -384,7 +384,7 @@ class FunctionCallFilterCCC : public CorrectionCandidateCallback {
384384

385385
bool ValidateCandidate(const TypoCorrection &candidate) override;
386386
std::unique_ptr<CorrectionCandidateCallback> clone() override {
387-
return llvm::make_unique<FunctionCallFilterCCC>(*this);
387+
return std::make_unique<FunctionCallFilterCCC>(*this);
388388
}
389389

390390
private:
@@ -409,7 +409,7 @@ class NoTypoCorrectionCCC final : public CorrectionCandidateCallback {
409409
return false;
410410
}
411411
std::unique_ptr<CorrectionCandidateCallback> clone() override {
412-
return llvm::make_unique<NoTypoCorrectionCCC>(*this);
412+
return std::make_unique<NoTypoCorrectionCCC>(*this);
413413
}
414414
};
415415

clang/include/clang/Serialization/ASTReader.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,7 +1578,7 @@ class ASTReader
15781578
/// Takes ownership of \p L.
15791579
void addListener(std::unique_ptr<ASTReaderListener> L) {
15801580
if (Listener)
1581-
L = llvm::make_unique<ChainedASTReaderListener>(std::move(L),
1581+
L = std::make_unique<ChainedASTReaderListener>(std::move(L),
15821582
std::move(Listener));
15831583
Listener = std::move(L);
15841584
}
@@ -1594,7 +1594,7 @@ class ASTReader
15941594
auto Old = Reader.takeListener();
15951595
if (Old) {
15961596
Chained = true;
1597-
L = llvm::make_unique<ChainedASTReaderListener>(std::move(L),
1597+
L = std::make_unique<ChainedASTReaderListener>(std::move(L),
15981598
std::move(Old));
15991599
}
16001600
Reader.setListener(std::move(L));

clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ class NoteTag : public ProgramPointTag {
646646

647647
public:
648648
const NoteTag *makeNoteTag(Callback &&Cb, bool IsPrunable = false) {
649-
// We cannot use make_unique because we cannot access the private
649+
// We cannot use std::make_unique because we cannot access the private
650650
// constructor from inside it.
651651
std::unique_ptr<NoteTag> T(new NoteTag(std::move(Cb), IsPrunable));
652652
Tags.push_back(std::move(T));

clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ class ExplodedGraph {
337337
bool IsSink = false);
338338

339339
std::unique_ptr<ExplodedGraph> MakeEmptyGraph() const {
340-
return llvm::make_unique<ExplodedGraph>();
340+
return std::make_unique<ExplodedGraph>();
341341
}
342342

343343
/// addRoot - Add an untyped node to the set of roots.

clang/include/clang/Tooling/ASTDiff/ASTDiff.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class SyntaxTree {
7171
/// Constructs a tree from any AST node.
7272
template <class T>
7373
SyntaxTree(T *Node, ASTContext &AST)
74-
: TreeImpl(llvm::make_unique<Impl>(this, Node, AST)) {}
74+
: TreeImpl(std::make_unique<Impl>(this, Node, AST)) {}
7575
SyntaxTree(SyntaxTree &&Other) = default;
7676
~SyntaxTree();
7777

clang/include/clang/Tooling/Refactoring/RefactoringActionRulesInternal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ createRefactoringActionRule(const RequirementTypes &... Requirements) {
148148
std::tuple<RequirementTypes...> Requirements;
149149
};
150150

151-
return llvm::make_unique<Rule>(std::make_tuple(Requirements...));
151+
return std::make_unique<Rule>(std::make_tuple(Requirements...));
152152
}
153153

154154
} // end namespace tooling

clang/lib/ARCMigrate/ARCMT.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,8 @@ class ARCMTMacroTrackerAction : public ASTFrontendAction {
453453
std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI,
454454
StringRef InFile) override {
455455
CI.getPreprocessor().addPPCallbacks(
456-
llvm::make_unique<ARCMTMacroTrackerPPCallbacks>(ARCMTMacroLocs));
457-
return llvm::make_unique<ASTConsumer>();
456+
std::make_unique<ARCMTMacroTrackerPPCallbacks>(ARCMTMacroLocs));
457+
return std::make_unique<ASTConsumer>();
458458
}
459459
};
460460

clang/lib/ARCMigrate/ObjCMT.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,10 @@ ObjCMigrateAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
208208
CI.getPreprocessor().addPPCallbacks(std::unique_ptr<PPCallbacks>(PPRec));
209209
std::vector<std::unique_ptr<ASTConsumer>> Consumers;
210210
Consumers.push_back(WrapperFrontendAction::CreateASTConsumer(CI, InFile));
211-
Consumers.push_back(llvm::make_unique<ObjCMigrateASTConsumer>(
211+
Consumers.push_back(std::make_unique<ObjCMigrateASTConsumer>(
212212
MigrateDir, ObjCMigAction, Remapper, CompInst->getFileManager(), PPRec,
213213
CompInst->getPreprocessor(), false, None));
214-
return llvm::make_unique<MultiplexConsumer>(std::move(Consumers));
214+
return std::make_unique<MultiplexConsumer>(std::move(Consumers));
215215
}
216216

217217
bool ObjCMigrateAction::BeginInvocation(CompilerInstance &CI) {
@@ -2034,7 +2034,7 @@ MigrateSourceAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
20342034
CI.getPreprocessor().addPPCallbacks(std::unique_ptr<PPCallbacks>(PPRec));
20352035
std::vector<std::string> WhiteList =
20362036
getWhiteListFilenames(CI.getFrontendOpts().ObjCMTWhiteListPath);
2037-
return llvm::make_unique<ObjCMigrateASTConsumer>(
2037+
return std::make_unique<ObjCMigrateASTConsumer>(
20382038
CI.getFrontendOpts().OutputFile, ObjCMTAction, Remapper,
20392039
CI.getFileManager(), PPRec, CI.getPreprocessor(),
20402040
/*isOutputFile=*/true, WhiteList);

clang/lib/AST/ASTContext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10472,7 +10472,7 @@ ASTContext::getParents(const ast_type_traits::DynTypedNode &Node) {
1047210472
if (!Parents)
1047310473
// We build the parent map for the traversal scope (usually whole TU), as
1047410474
// hasAncestor can escape any subtree.
10475-
Parents = llvm::make_unique<ParentMap>(*this);
10475+
Parents = std::make_unique<ParentMap>(*this);
1047610476
return Parents->getParents(Node);
1047710477
}
1047810478

clang/lib/AST/CXXInheritance.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void CXXBasePaths::ComputeDeclsFound() {
4444
Decls.insert(Path->Decls.front());
4545

4646
NumDeclsFound = Decls.size();
47-
DeclsFound = llvm::make_unique<NamedDecl *[]>(NumDeclsFound);
47+
DeclsFound = std::make_unique<NamedDecl *[]>(NumDeclsFound);
4848
std::copy(Decls.begin(), Decls.end(), DeclsFound.get());
4949
}
5050

clang/lib/AST/ExternalASTMerger.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ ExternalASTMerger::ExternalASTMerger(const ImporterTarget &Target,
320320
void ExternalASTMerger::AddSources(llvm::ArrayRef<ImporterSource> Sources) {
321321
for (const ImporterSource &S : Sources) {
322322
assert(&S.AST != &Target.AST);
323-
Importers.push_back(llvm::make_unique<LazyASTImporter>(
323+
Importers.push_back(std::make_unique<LazyASTImporter>(
324324
*this, Target.AST, Target.FM, S.AST, S.FM, S.OM));
325325
}
326326
}

clang/lib/AST/ItaniumCXXABI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ class ItaniumCXXABI : public CXXABI {
218218

219219
std::unique_ptr<MangleNumberingContext>
220220
createMangleNumberingContext() const override {
221-
return llvm::make_unique<ItaniumNumberingContext>();
221+
return std::make_unique<ItaniumNumberingContext>();
222222
}
223223
};
224224
}

clang/lib/AST/Mangle.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ class ASTNameGenerator::Implementation {
470470
};
471471

472472
ASTNameGenerator::ASTNameGenerator(ASTContext &Ctx)
473-
: Impl(llvm::make_unique<Implementation>(Ctx)) {}
473+
: Impl(std::make_unique<Implementation>(Ctx)) {}
474474

475475
ASTNameGenerator::~ASTNameGenerator() {}
476476

clang/lib/AST/MicrosoftCXXABI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class MicrosoftCXXABI : public CXXABI {
132132

133133
std::unique_ptr<MangleNumberingContext>
134134
createMangleNumberingContext() const override {
135-
return llvm::make_unique<MicrosoftNumberingContext>();
135+
return std::make_unique<MicrosoftNumberingContext>();
136136
}
137137
};
138138
}

clang/lib/AST/VTableBuilder.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2268,7 +2268,7 @@ CreateVTableLayout(const ItaniumVTableBuilder &Builder) {
22682268
SmallVector<VTableLayout::VTableThunkTy, 1>
22692269
VTableThunks(Builder.vtable_thunks_begin(), Builder.vtable_thunks_end());
22702270

2271-
return llvm::make_unique<VTableLayout>(
2271+
return std::make_unique<VTableLayout>(
22722272
Builder.VTableIndices, Builder.vtable_components(), VTableThunks,
22732273
Builder.getAddressPoints());
22742274
}
@@ -3253,7 +3253,7 @@ void MicrosoftVTableContext::computeVTablePaths(bool ForVBTables,
32533253

32543254
// Base case: this subobject has its own vptr.
32553255
if (ForVBTables ? Layout.hasOwnVBPtr() : Layout.hasOwnVFPtr())
3256-
Paths.push_back(llvm::make_unique<VPtrInfo>(RD));
3256+
Paths.push_back(std::make_unique<VPtrInfo>(RD));
32573257

32583258
// Recursive case: get all the vbtables from our bases and remove anything
32593259
// that shares a virtual base.
@@ -3276,7 +3276,7 @@ void MicrosoftVTableContext::computeVTablePaths(bool ForVBTables,
32763276
continue;
32773277

32783278
// Copy the path and adjust it as necessary.
3279-
auto P = llvm::make_unique<VPtrInfo>(*BaseInfo);
3279+
auto P = std::make_unique<VPtrInfo>(*BaseInfo);
32803280

32813281
// We mangle Base into the path if the path would've been ambiguous and it
32823282
// wasn't already extended with Base.
@@ -3562,7 +3562,7 @@ void MicrosoftVTableContext::computeVTableRelatedInformation(
35623562
const VTableLayout::AddressPointsMapTy EmptyAddressPointsMap;
35633563

35643564
{
3565-
auto VFPtrs = llvm::make_unique<VPtrInfoVector>();
3565+
auto VFPtrs = std::make_unique<VPtrInfoVector>();
35663566
computeVTablePaths(/*ForVBTables=*/false, RD, *VFPtrs);
35673567
computeFullPathsForVFTables(Context, RD, *VFPtrs);
35683568
VFPtrLocations[RD] = std::move(VFPtrs);
@@ -3576,7 +3576,7 @@ void MicrosoftVTableContext::computeVTableRelatedInformation(
35763576
assert(VFTableLayouts.count(id) == 0);
35773577
SmallVector<VTableLayout::VTableThunkTy, 1> VTableThunks(
35783578
Builder.vtable_thunks_begin(), Builder.vtable_thunks_end());
3579-
VFTableLayouts[id] = llvm::make_unique<VTableLayout>(
3579+
VFTableLayouts[id] = std::make_unique<VTableLayout>(
35803580
ArrayRef<size_t>{0}, Builder.vtable_components(), VTableThunks,
35813581
EmptyAddressPointsMap);
35823582
Thunks.insert(Builder.thunks_begin(), Builder.thunks_end());
@@ -3668,7 +3668,7 @@ const VirtualBaseInfo &MicrosoftVTableContext::computeVBTableRelatedInformation(
36683668
std::unique_ptr<VirtualBaseInfo> &Entry = VBaseInfo[RD];
36693669
if (Entry)
36703670
return *Entry;
3671-
Entry = llvm::make_unique<VirtualBaseInfo>();
3671+
Entry = std::make_unique<VirtualBaseInfo>();
36723672
VBI = Entry.get();
36733673
}
36743674

clang/lib/ASTMatchers/ASTMatchFinder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,7 @@ bool MatchFinder::addDynamicMatcher(const internal::DynTypedMatcher &NodeMatch,
10781078
}
10791079

10801080
std::unique_ptr<ASTConsumer> MatchFinder::newASTConsumer() {
1081-
return llvm::make_unique<internal::MatchASTConsumer>(this, ParsingDone);
1081+
return std::make_unique<internal::MatchASTConsumer>(this, ParsingDone);
10821082
}
10831083

10841084
void MatchFinder::match(const clang::ast_type_traits::DynTypedNode &Node,

clang/lib/ASTMatchers/Dynamic/Marshallers.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ std::unique_ptr<MatcherDescriptor>
729729
makeMatcherAutoMarshall(ReturnType (*Func)(), StringRef MatcherName) {
730730
std::vector<ast_type_traits::ASTNodeKind> RetTypes;
731731
BuildReturnTypeVector<ReturnType>::build(RetTypes);
732-
return llvm::make_unique<FixedArgCountMatcherDescriptor>(
732+
return std::make_unique<FixedArgCountMatcherDescriptor>(
733733
matcherMarshall0<ReturnType>, reinterpret_cast<void (*)()>(Func),
734734
MatcherName, RetTypes, None);
735735
}
@@ -741,7 +741,7 @@ makeMatcherAutoMarshall(ReturnType (*Func)(ArgType1), StringRef MatcherName) {
741741
std::vector<ast_type_traits::ASTNodeKind> RetTypes;
742742
BuildReturnTypeVector<ReturnType>::build(RetTypes);
743743
ArgKind AK = ArgTypeTraits<ArgType1>::getKind();
744-
return llvm::make_unique<FixedArgCountMatcherDescriptor>(
744+
return std::make_unique<FixedArgCountMatcherDescriptor>(
745745
matcherMarshall1<ReturnType, ArgType1>,
746746
reinterpret_cast<void (*)()>(Func), MatcherName, RetTypes, AK);
747747
}
@@ -755,7 +755,7 @@ makeMatcherAutoMarshall(ReturnType (*Func)(ArgType1, ArgType2),
755755
BuildReturnTypeVector<ReturnType>::build(RetTypes);
756756
ArgKind AKs[] = { ArgTypeTraits<ArgType1>::getKind(),
757757
ArgTypeTraits<ArgType2>::getKind() };
758-
return llvm::make_unique<FixedArgCountMatcherDescriptor>(
758+
return std::make_unique<FixedArgCountMatcherDescriptor>(
759759
matcherMarshall2<ReturnType, ArgType1, ArgType2>,
760760
reinterpret_cast<void (*)()>(Func), MatcherName, RetTypes, AKs);
761761
}
@@ -766,7 +766,7 @@ template <typename ResultT, typename ArgT,
766766
std::unique_ptr<MatcherDescriptor> makeMatcherAutoMarshall(
767767
ast_matchers::internal::VariadicFunction<ResultT, ArgT, Func> VarFunc,
768768
StringRef MatcherName) {
769-
return llvm::make_unique<VariadicFuncMatcherDescriptor>(VarFunc, MatcherName);
769+
return std::make_unique<VariadicFuncMatcherDescriptor>(VarFunc, MatcherName);
770770
}
771771

772772
/// Overload for VariadicDynCastAllOfMatchers.
@@ -778,7 +778,7 @@ std::unique_ptr<MatcherDescriptor> makeMatcherAutoMarshall(
778778
ast_matchers::internal::VariadicDynCastAllOfMatcher<BaseT, DerivedT>
779779
VarFunc,
780780
StringRef MatcherName) {
781-
return llvm::make_unique<DynCastAllOfMatcherDescriptor>(VarFunc, MatcherName);
781+
return std::make_unique<DynCastAllOfMatcherDescriptor>(VarFunc, MatcherName);
782782
}
783783

784784
/// Argument adaptative overload.
@@ -791,7 +791,7 @@ std::unique_ptr<MatcherDescriptor> makeMatcherAutoMarshall(
791791
std::vector<std::unique_ptr<MatcherDescriptor>> Overloads;
792792
AdaptativeOverloadCollector<ArgumentAdapterT, FromTypes, ToTypes>(MatcherName,
793793
Overloads);
794-
return llvm::make_unique<OverloadedMatcherDescriptor>(Overloads);
794+
return std::make_unique<OverloadedMatcherDescriptor>(Overloads);
795795
}
796796

797797
template <template <typename ToArg, typename FromArg> class ArgumentAdapterT,
@@ -810,7 +810,7 @@ std::unique_ptr<MatcherDescriptor> makeMatcherAutoMarshall(
810810
ast_matchers::internal::VariadicOperatorMatcherFunc<MinCount, MaxCount>
811811
Func,
812812
StringRef MatcherName) {
813-
return llvm::make_unique<VariadicOperatorMatcherDescriptor>(
813+
return std::make_unique<VariadicOperatorMatcherDescriptor>(
814814
MinCount, MaxCount, Func.Op, MatcherName);
815815
}
816816

clang/lib/ASTMatchers/Dynamic/Registry.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ void RegistryMaps::registerMatcher(
7171

7272
#define REGISTER_MATCHER_OVERLOAD(name) \
7373
registerMatcher(#name, \
74-
llvm::make_unique<internal::OverloadedMatcherDescriptor>(name##Callbacks))
74+
std::make_unique<internal::OverloadedMatcherDescriptor>(name##Callbacks))
7575

7676
#define SPECIFIC_MATCHER_OVERLOAD(name, Id) \
7777
static_cast<::clang::ast_matchers::name##_Type##Id>( \

0 commit comments

Comments
 (0)