diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-08-14 23:04:18 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-08-14 23:04:18 +0000 |
commit | 2b3d49b610bd2a45884115edcb21110bfa325f51 (patch) | |
tree | 4c64632086b8cf0a8d7ee68306f564532a5ea78f /clang/lib/Sema | |
parent | 5cd312d352dc663aec3b658e2bf5da347f365eb1 (diff) | |
download | bcm5719-llvm-2b3d49b610bd2a45884115edcb21110bfa325f51.tar.gz bcm5719-llvm-2b3d49b610bd2a45884115edcb21110bfa325f51.zip |
[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
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r-- | clang/lib/Sema/Sema.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Sema/SemaCXXScopeSpec.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 6 | ||||
-rw-r--r-- | clang/lib/Sema/SemaDeclCXX.cpp | 6 | ||||
-rw-r--r-- | clang/lib/Sema/SemaDeclObjC.cpp | 4 | ||||
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Sema/SemaExprMember.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Sema/SemaExprObjC.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Sema/SemaInit.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Sema/SemaLookup.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Sema/SemaOpenMP.cpp | 4 | ||||
-rw-r--r-- | clang/lib/Sema/SemaTemplate.cpp | 6 | ||||
-rw-r--r-- | clang/lib/Sema/SemaTemplateVariadic.cpp | 2 |
13 files changed, 21 insertions, 21 deletions
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp index 101a135e948..e8bad88aee6 100644 --- a/clang/lib/Sema/Sema.cpp +++ b/clang/lib/Sema/Sema.cpp @@ -181,7 +181,7 @@ Sema::Sema(Preprocessor &pp, ASTContext &ctxt, ASTConsumer &consumer, InitDataSharingAttributesStack(); std::unique_ptr<sema::SemaPPCallbacks> Callbacks = - llvm::make_unique<sema::SemaPPCallbacks>(); + std::make_unique<sema::SemaPPCallbacks>(); SemaPPCallbackHandler = Callbacks.get(); PP.addPPCallbacks(std::move(Callbacks)); SemaPPCallbackHandler->set(*this); diff --git a/clang/lib/Sema/SemaCXXScopeSpec.cpp b/clang/lib/Sema/SemaCXXScopeSpec.cpp index c473856f0b0..a4421d2b68a 100644 --- a/clang/lib/Sema/SemaCXXScopeSpec.cpp +++ b/clang/lib/Sema/SemaCXXScopeSpec.cpp @@ -440,7 +440,7 @@ public: } std::unique_ptr<CorrectionCandidateCallback> clone() override { - return llvm::make_unique<NestedNameSpecifierValidatorCCC>(*this); + return std::make_unique<NestedNameSpecifierValidatorCCC>(*this); } private: diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 3cda1581b04..b8cefac2f90 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -106,7 +106,7 @@ class TypeNameValidatorCCC final : public CorrectionCandidateCallback { } std::unique_ptr<CorrectionCandidateCallback> clone() override { - return llvm::make_unique<TypeNameValidatorCCC>(*this); + return std::make_unique<TypeNameValidatorCCC>(*this); } private: @@ -7785,7 +7785,7 @@ class DifferentNameValidatorCCC final : public CorrectionCandidateCallback { } std::unique_ptr<CorrectionCandidateCallback> clone() override { - return llvm::make_unique<DifferentNameValidatorCCC>(*this); + return std::make_unique<DifferentNameValidatorCCC>(*this); } private: @@ -16791,7 +16791,7 @@ static void CheckForDuplicateEnumValues(Sema &S, ArrayRef<Decl *> Elements, continue; // Create new vector and push values onto it. - auto Vec = llvm::make_unique<ECDVector>(); + auto Vec = std::make_unique<ECDVector>(); Vec->push_back(D); Vec->push_back(ECD); diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index accca46666b..b5d46681b57 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -3944,7 +3944,7 @@ public: } std::unique_ptr<CorrectionCandidateCallback> clone() override { - return llvm::make_unique<MemInitializerValidatorCCC>(*this); + return std::make_unique<MemInitializerValidatorCCC>(*this); } private: @@ -9504,7 +9504,7 @@ public: } std::unique_ptr<CorrectionCandidateCallback> clone() override { - return llvm::make_unique<NamespaceValidatorCCC>(*this); + return std::make_unique<NamespaceValidatorCCC>(*this); } }; @@ -10083,7 +10083,7 @@ public: } std::unique_ptr<CorrectionCandidateCallback> clone() override { - return llvm::make_unique<UsingValidatorCCC>(*this); + return std::make_unique<UsingValidatorCCC>(*this); } private: diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp index e629837eb71..5fab2a14787 100644 --- a/clang/lib/Sema/SemaDeclObjC.cpp +++ b/clang/lib/Sema/SemaDeclObjC.cpp @@ -512,7 +512,7 @@ class ObjCInterfaceValidatorCCC final : public CorrectionCandidateCallback { } std::unique_ptr<CorrectionCandidateCallback> clone() override { - return llvm::make_unique<ObjCInterfaceValidatorCCC>(*this); + return std::make_unique<ObjCInterfaceValidatorCCC>(*this); } private: @@ -1387,7 +1387,7 @@ class ObjCTypeArgOrProtocolValidatorCCC final } std::unique_ptr<CorrectionCandidateCallback> clone() override { - return llvm::make_unique<ObjCTypeArgOrProtocolValidatorCCC>(*this); + return std::make_unique<ObjCTypeArgOrProtocolValidatorCCC>(*this); } }; } // end anonymous namespace diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 585f95c4180..de06cc8363f 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -4944,7 +4944,7 @@ public: } std::unique_ptr<CorrectionCandidateCallback> clone() override { - return llvm::make_unique<FunctionCallCCC>(*this); + return std::make_unique<FunctionCallCCC>(*this); } private: diff --git a/clang/lib/Sema/SemaExprMember.cpp b/clang/lib/Sema/SemaExprMember.cpp index 3ba77f19a6b..e85499c0bbf 100644 --- a/clang/lib/Sema/SemaExprMember.cpp +++ b/clang/lib/Sema/SemaExprMember.cpp @@ -629,7 +629,7 @@ public: } std::unique_ptr<CorrectionCandidateCallback> clone() override { - return llvm::make_unique<RecordMemberExprValidatorCCC>(*this); + return std::make_unique<RecordMemberExprValidatorCCC>(*this); } private: diff --git a/clang/lib/Sema/SemaExprObjC.cpp b/clang/lib/Sema/SemaExprObjC.cpp index 040cfdd30c7..fb91f0b7695 100644 --- a/clang/lib/Sema/SemaExprObjC.cpp +++ b/clang/lib/Sema/SemaExprObjC.cpp @@ -2115,7 +2115,7 @@ class ObjCInterfaceOrSuperCCC final : public CorrectionCandidateCallback { } std::unique_ptr<CorrectionCandidateCallback> clone() override { - return llvm::make_unique<ObjCInterfaceOrSuperCCC>(*this); + return std::make_unique<ObjCInterfaceOrSuperCCC>(*this); } }; diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp index e11cc92e1bb..457f6424979 100644 --- a/clang/lib/Sema/SemaInit.cpp +++ b/clang/lib/Sema/SemaInit.cpp @@ -2236,7 +2236,7 @@ class FieldInitializerValidatorCCC final : public CorrectionCandidateCallback { } std::unique_ptr<CorrectionCandidateCallback> clone() override { - return llvm::make_unique<FieldInitializerValidatorCCC>(*this); + return std::make_unique<FieldInitializerValidatorCCC>(*this); } private: diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp index 8a24dd884a7..5127ce026c8 100644 --- a/clang/lib/Sema/SemaLookup.cpp +++ b/clang/lib/Sema/SemaLookup.cpp @@ -4745,7 +4745,7 @@ std::unique_ptr<TypoCorrectionConsumer> Sema::makeTypoCorrectionConsumer( // occurs). Note that CorrectionCandidateCallback is polymorphic and // initially stack-allocated. std::unique_ptr<CorrectionCandidateCallback> ClonedCCC = CCC.clone(); - auto Consumer = llvm::make_unique<TypoCorrectionConsumer>( + auto Consumer = std::make_unique<TypoCorrectionConsumer>( *this, TypoName, LookupKind, S, SS, std::move(ClonedCCC), MemberContext, EnteringContext); diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp index 3c23e43a20a..4f0e20bd9ae 100644 --- a/clang/lib/Sema/SemaOpenMP.cpp +++ b/clang/lib/Sema/SemaOpenMP.cpp @@ -2049,7 +2049,7 @@ public: } std::unique_ptr<CorrectionCandidateCallback> clone() override { - return llvm::make_unique<VarDeclFilterCCC>(*this); + return std::make_unique<VarDeclFilterCCC>(*this); } }; @@ -2071,7 +2071,7 @@ public: } std::unique_ptr<CorrectionCandidateCallback> clone() override { - return llvm::make_unique<VarOrFuncDeclFilterCCC>(*this); + return std::make_unique<VarOrFuncDeclFilterCCC>(*this); } }; diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp index ce0c2ef4022..a73c5d3f9bc 100644 --- a/clang/lib/Sema/SemaTemplate.cpp +++ b/clang/lib/Sema/SemaTemplate.cpp @@ -644,7 +644,7 @@ void Sema::diagnoseExprIntendedAsTemplateName(Scope *S, ExprResult TemplateName, } std::unique_ptr<CorrectionCandidateCallback> clone() override { - return llvm::make_unique<TemplateCandidateFilter>(*this); + return std::make_unique<TemplateCandidateFilter>(*this); } }; @@ -3455,7 +3455,7 @@ bool Sema::resolveAssumedTemplateNameAsType(Scope *S, TemplateName &Name, getAsTypeTemplateDecl(TC.getCorrectionDecl()); } std::unique_ptr<CorrectionCandidateCallback> clone() override { - return llvm::make_unique<CandidateCallback>(*this); + return std::make_unique<CandidateCallback>(*this); } } FilterCCC; @@ -10297,7 +10297,7 @@ void Sema::MarkAsLateParsedTemplate(FunctionDecl *FD, Decl *FnD, if (!FD) return; - auto LPT = llvm::make_unique<LateParsedTemplate>(); + auto LPT = std::make_unique<LateParsedTemplate>(); // Take tokens to avoid allocations LPT->Toks.swap(Toks); diff --git a/clang/lib/Sema/SemaTemplateVariadic.cpp b/clang/lib/Sema/SemaTemplateVariadic.cpp index d97626551a4..f90bff6e7ac 100644 --- a/clang/lib/Sema/SemaTemplateVariadic.cpp +++ b/clang/lib/Sema/SemaTemplateVariadic.cpp @@ -937,7 +937,7 @@ class ParameterPackValidatorCCC final : public CorrectionCandidateCallback { } std::unique_ptr<CorrectionCandidateCallback> clone() override { - return llvm::make_unique<ParameterPackValidatorCCC>(*this); + return std::make_unique<ParameterPackValidatorCCC>(*this); } }; |