diff options
Diffstat (limited to 'clang/lib/Tooling')
16 files changed, 28 insertions, 28 deletions
diff --git a/clang/lib/Tooling/ASTDiff/ASTDiff.cpp b/clang/lib/Tooling/ASTDiff/ASTDiff.cpp index 69eff20bff7..00db7702cd8 100644 --- a/clang/lib/Tooling/ASTDiff/ASTDiff.cpp +++ b/clang/lib/Tooling/ASTDiff/ASTDiff.cpp @@ -35,8 +35,8 @@ public: Mapping &operator=(Mapping &&Other) = default; Mapping(size_t Size) { - SrcToDst = llvm::make_unique<NodeId[]>(Size); - DstToSrc = llvm::make_unique<NodeId[]>(Size); + SrcToDst = std::make_unique<NodeId[]>(Size); + DstToSrc = std::make_unique<NodeId[]>(Size); } void link(NodeId Src, NodeId Dst) { @@ -565,13 +565,13 @@ public: ZhangShashaMatcher(const ASTDiff::Impl &DiffImpl, const SyntaxTree::Impl &T1, const SyntaxTree::Impl &T2, NodeId Id1, NodeId Id2) : DiffImpl(DiffImpl), S1(T1, Id1), S2(T2, Id2) { - TreeDist = llvm::make_unique<std::unique_ptr<double[]>[]>( + TreeDist = std::make_unique<std::unique_ptr<double[]>[]>( size_t(S1.getSize()) + 1); - ForestDist = llvm::make_unique<std::unique_ptr<double[]>[]>( + ForestDist = std::make_unique<std::unique_ptr<double[]>[]>( size_t(S1.getSize()) + 1); for (int I = 0, E = S1.getSize() + 1; I < E; ++I) { - TreeDist[I] = llvm::make_unique<double[]>(size_t(S2.getSize()) + 1); - ForestDist[I] = llvm::make_unique<double[]>(size_t(S2.getSize()) + 1); + TreeDist[I] = std::make_unique<double[]>(size_t(S2.getSize()) + 1); + ForestDist[I] = std::make_unique<double[]>(size_t(S2.getSize()) + 1); } } @@ -960,7 +960,7 @@ void ASTDiff::Impl::computeChangeKinds(Mapping &M) { ASTDiff::ASTDiff(SyntaxTree &T1, SyntaxTree &T2, const ComparisonOptions &Options) - : DiffImpl(llvm::make_unique<Impl>(*T1.TreeImpl, *T2.TreeImpl, Options)) {} + : DiffImpl(std::make_unique<Impl>(*T1.TreeImpl, *T2.TreeImpl, Options)) {} ASTDiff::~ASTDiff() = default; @@ -969,7 +969,7 @@ NodeId ASTDiff::getMapped(const SyntaxTree &SourceTree, NodeId Id) const { } SyntaxTree::SyntaxTree(ASTContext &AST) - : TreeImpl(llvm::make_unique<SyntaxTree::Impl>( + : TreeImpl(std::make_unique<SyntaxTree::Impl>( this, AST.getTranslationUnitDecl(), AST)) {} SyntaxTree::~SyntaxTree() = default; diff --git a/clang/lib/Tooling/AllTUsExecution.cpp b/clang/lib/Tooling/AllTUsExecution.cpp index 6bda195f697..267f945f567 100644 --- a/clang/lib/Tooling/AllTUsExecution.cpp +++ b/clang/lib/Tooling/AllTUsExecution.cpp @@ -162,7 +162,7 @@ public: return make_string_error( "[AllTUsToolExecutorPlugin] Please provide a directory/file path in " "the compilation database."); - return llvm::make_unique<AllTUsToolExecutor>(std::move(OptionsParser), + return std::make_unique<AllTUsToolExecutor>(std::move(OptionsParser), ExecutorConcurrency); } }; diff --git a/clang/lib/Tooling/CommonOptionsParser.cpp b/clang/lib/Tooling/CommonOptionsParser.cpp index f7956f7998f..5d881aab1e0 100644 --- a/clang/lib/Tooling/CommonOptionsParser.cpp +++ b/clang/lib/Tooling/CommonOptionsParser.cpp @@ -142,7 +142,7 @@ llvm::Error CommonOptionsParser::init( } } auto AdjustingCompilations = - llvm::make_unique<ArgumentsAdjustingCompilations>( + std::make_unique<ArgumentsAdjustingCompilations>( std::move(Compilations)); Adjuster = getInsertArgumentAdjuster(ArgsBefore, ArgumentInsertPosition::BEGIN); diff --git a/clang/lib/Tooling/CompilationDatabase.cpp b/clang/lib/Tooling/CompilationDatabase.cpp index 4c64750bef1..c453e8d7df1 100644 --- a/clang/lib/Tooling/CompilationDatabase.cpp +++ b/clang/lib/Tooling/CompilationDatabase.cpp @@ -356,7 +356,7 @@ FixedCompilationDatabase::loadFromCommandLine(int &Argc, std::vector<std::string> StrippedArgs; if (!stripPositionalArgs(CommandLine, StrippedArgs, ErrorMsg)) return nullptr; - return llvm::make_unique<FixedCompilationDatabase>(Directory, StrippedArgs); + return std::make_unique<FixedCompilationDatabase>(Directory, StrippedArgs); } std::unique_ptr<FixedCompilationDatabase> @@ -370,7 +370,7 @@ FixedCompilationDatabase::loadFromFile(StringRef Path, std::string &ErrorMsg) { } std::vector<std::string> Args{llvm::line_iterator(**File), llvm::line_iterator()}; - return llvm::make_unique<FixedCompilationDatabase>( + return std::make_unique<FixedCompilationDatabase>( llvm::sys::path::parent_path(Path), std::move(Args)); } diff --git a/clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp b/clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp index d26a97e1823..487d2c35c25 100644 --- a/clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp +++ b/clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp @@ -88,7 +88,7 @@ DependencyScanningFilesystemSharedCache:: // FIXME: A better heuristic might also consider the OS to account for // the different cost of lock contention on different OSes. NumShards = std::max(2u, llvm::hardware_concurrency() / 4); - CacheShards = llvm::make_unique<CacheShard[]>(NumShards); + CacheShards = std::make_unique<CacheShard[]>(NumShards); } /// Returns a cache entry for the corresponding key. @@ -176,7 +176,7 @@ createFile(const CachedFileSystemEntry *Entry) { llvm::ErrorOr<StringRef> Contents = Entry->getContents(); if (!Contents) return Contents.getError(); - return llvm::make_unique<MinimizedVFSFile>( + return std::make_unique<MinimizedVFSFile>( llvm::MemoryBuffer::getMemBuffer(*Contents, Entry->getName(), /*RequiresNullTerminator=*/false), *Entry->getStatus()); diff --git a/clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp b/clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp index f546719278a..c80a55645eb 100644 --- a/clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp +++ b/clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp @@ -116,7 +116,7 @@ public: // invocation to the collector. The options in the invocation are reset, // which ensures that the compiler won't create new dependency collectors, // and thus won't write out the extra '.d' files to disk. - auto Opts = llvm::make_unique<DependencyOutputOptions>( + auto Opts = std::make_unique<DependencyOutputOptions>( std::move(Compiler.getInvocation().getDependencyOutputOpts())); // We need at least one -MT equivalent for the generator to work. if (Opts->Targets.empty()) @@ -124,7 +124,7 @@ public: Compiler.addDependencyCollector(std::make_shared<DependencyPrinter>( std::move(Opts), DependencyFileContents)); - auto Action = llvm::make_unique<PreprocessOnlyAction>(); + auto Action = std::make_unique<PreprocessOnlyAction>(); const bool Result = Compiler.ExecuteAction(*Action); if (!DepFS) FileMgr->clearStatCache(); diff --git a/clang/lib/Tooling/GuessTargetAndModeCompilationDatabase.cpp b/clang/lib/Tooling/GuessTargetAndModeCompilationDatabase.cpp index ac3faf1b01f..b6c1c0952ac 100644 --- a/clang/lib/Tooling/GuessTargetAndModeCompilationDatabase.cpp +++ b/clang/lib/Tooling/GuessTargetAndModeCompilationDatabase.cpp @@ -50,7 +50,7 @@ private: std::unique_ptr<CompilationDatabase> inferTargetAndDriverMode(std::unique_ptr<CompilationDatabase> Base) { - return llvm::make_unique<TargetAndModeAdderDatabase>(std::move(Base)); + return std::make_unique<TargetAndModeAdderDatabase>(std::move(Base)); } } // namespace tooling diff --git a/clang/lib/Tooling/InterpolatingCompilationDatabase.cpp b/clang/lib/Tooling/InterpolatingCompilationDatabase.cpp index aa1d696a1da..bdd34766a95 100644 --- a/clang/lib/Tooling/InterpolatingCompilationDatabase.cpp +++ b/clang/lib/Tooling/InterpolatingCompilationDatabase.cpp @@ -537,7 +537,7 @@ private: std::unique_ptr<CompilationDatabase> inferMissingCompileCommands(std::unique_ptr<CompilationDatabase> Inner) { - return llvm::make_unique<InterpolatingCompilationDatabase>(std::move(Inner)); + return std::make_unique<InterpolatingCompilationDatabase>(std::move(Inner)); } } // namespace tooling diff --git a/clang/lib/Tooling/Refactoring/ASTSelectionRequirements.cpp b/clang/lib/Tooling/Refactoring/ASTSelectionRequirements.cpp index 14fc66a979a..7dfd3988d90 100644 --- a/clang/lib/Tooling/Refactoring/ASTSelectionRequirements.cpp +++ b/clang/lib/Tooling/Refactoring/ASTSelectionRequirements.cpp @@ -35,7 +35,7 @@ Expected<CodeRangeASTSelection> CodeRangeASTSelectionRequirement::evaluate( if (!ASTSelection) return ASTSelection.takeError(); std::unique_ptr<SelectedASTNode> StoredSelection = - llvm::make_unique<SelectedASTNode>(std::move(*ASTSelection)); + std::make_unique<SelectedASTNode>(std::move(*ASTSelection)); Optional<CodeRangeASTSelection> CodeRange = CodeRangeASTSelection::create( Context.getSelectionRange(), *StoredSelection); if (!CodeRange) diff --git a/clang/lib/Tooling/Refactoring/RefactoringActions.cpp b/clang/lib/Tooling/Refactoring/RefactoringActions.cpp index 1a3833243ab..7ac723f67c0 100644 --- a/clang/lib/Tooling/Refactoring/RefactoringActions.cpp +++ b/clang/lib/Tooling/Refactoring/RefactoringActions.cpp @@ -98,8 +98,8 @@ public: std::vector<std::unique_ptr<RefactoringAction>> createRefactoringActions() { std::vector<std::unique_ptr<RefactoringAction>> Actions; - Actions.push_back(llvm::make_unique<LocalRename>()); - Actions.push_back(llvm::make_unique<ExtractRefactoring>()); + Actions.push_back(std::make_unique<LocalRename>()); + Actions.push_back(std::make_unique<ExtractRefactoring>()); return Actions; } diff --git a/clang/lib/Tooling/Refactoring/Rename/RenamingAction.cpp b/clang/lib/Tooling/Refactoring/Rename/RenamingAction.cpp index 1649513a077..b0634912e3f 100644 --- a/clang/lib/Tooling/Refactoring/Rename/RenamingAction.cpp +++ b/clang/lib/Tooling/Refactoring/Rename/RenamingAction.cpp @@ -266,12 +266,12 @@ private: }; std::unique_ptr<ASTConsumer> RenamingAction::newASTConsumer() { - return llvm::make_unique<RenamingASTConsumer>(NewNames, PrevNames, USRList, + return std::make_unique<RenamingASTConsumer>(NewNames, PrevNames, USRList, FileToReplaces, PrintLocations); } std::unique_ptr<ASTConsumer> QualifiedRenamingAction::newASTConsumer() { - return llvm::make_unique<USRSymbolRenamer>(NewNames, USRList, FileToReplaces); + return std::make_unique<USRSymbolRenamer>(NewNames, USRList, FileToReplaces); } } // end namespace tooling diff --git a/clang/lib/Tooling/Refactoring/Rename/SymbolOccurrences.cpp b/clang/lib/Tooling/Refactoring/Rename/SymbolOccurrences.cpp index 8cc1ffaf448..9e69d37e81a 100644 --- a/clang/lib/Tooling/Refactoring/Rename/SymbolOccurrences.cpp +++ b/clang/lib/Tooling/Refactoring/Rename/SymbolOccurrences.cpp @@ -25,7 +25,7 @@ SymbolOccurrence::SymbolOccurrence(const SymbolName &Name, OccurrenceKind Kind, Locations[0], Locations[0].getLocWithOffset(NamePieces[0].size())); return; } - MultipleRanges = llvm::make_unique<SourceRange[]>(Locations.size()); + MultipleRanges = std::make_unique<SourceRange[]>(Locations.size()); RangeOrNumRanges.setBegin( SourceLocation::getFromRawEncoding(Locations.size())); for (const auto &Loc : llvm::enumerate(Locations)) { diff --git a/clang/lib/Tooling/Refactoring/Rename/USRFindingAction.cpp b/clang/lib/Tooling/Refactoring/Rename/USRFindingAction.cpp index 54c6f3e734b..b60616ecc87 100644 --- a/clang/lib/Tooling/Refactoring/Rename/USRFindingAction.cpp +++ b/clang/lib/Tooling/Refactoring/Rename/USRFindingAction.cpp @@ -264,7 +264,7 @@ private: }; std::unique_ptr<ASTConsumer> USRFindingAction::newASTConsumer() { - return llvm::make_unique<NamedDeclFindingConsumer>( + return std::make_unique<NamedDeclFindingConsumer>( SymbolOffsets, QualifiedNames, SpellingNames, USRList, Force, ErrorOccurred); } diff --git a/clang/lib/Tooling/RefactoringCallbacks.cpp b/clang/lib/Tooling/RefactoringCallbacks.cpp index 2aa5b5bf9d9..919b83beb35 100644 --- a/clang/lib/Tooling/RefactoringCallbacks.cpp +++ b/clang/lib/Tooling/RefactoringCallbacks.cpp @@ -66,7 +66,7 @@ private: }; std::unique_ptr<ASTConsumer> ASTMatchRefactorer::newASTConsumer() { - return llvm::make_unique<RefactoringASTConsumer>(*this); + return std::make_unique<RefactoringASTConsumer>(*this); } static Replacement replaceStmtWithText(SourceManager &Sources, const Stmt &From, diff --git a/clang/lib/Tooling/StandaloneExecution.cpp b/clang/lib/Tooling/StandaloneExecution.cpp index ad82ee083a4..09094c3c23f 100644 --- a/clang/lib/Tooling/StandaloneExecution.cpp +++ b/clang/lib/Tooling/StandaloneExecution.cpp @@ -76,7 +76,7 @@ public: if (OptionsParser.getSourcePathList().empty()) return make_string_error( "[StandaloneToolExecutorPlugin] No positional argument found."); - return llvm::make_unique<StandaloneToolExecutor>(std::move(OptionsParser)); + return std::make_unique<StandaloneToolExecutor>(std::move(OptionsParser)); } }; diff --git a/clang/lib/Tooling/Syntax/Tokens.cpp b/clang/lib/Tooling/Syntax/Tokens.cpp index d82dc1f35c9..3852e71c37f 100644 --- a/clang/lib/Tooling/Syntax/Tokens.cpp +++ b/clang/lib/Tooling/Syntax/Tokens.cpp @@ -321,7 +321,7 @@ TokenCollector::TokenCollector(Preprocessor &PP) : PP(PP) { }); // And locations of macro calls, to properly recover boundaries of those in // case of empty expansions. - auto CB = llvm::make_unique<CollectPPExpansions>(*this); + auto CB = std::make_unique<CollectPPExpansions>(*this); this->Collector = CB.get(); PP.addPPCallbacks(std::move(CB)); } |