From ffb997a8eba7421fa660fc6a969621eb6650fd16 Mon Sep 17 00:00:00 2001 From: Alexander Shaposhnikov Date: Fri, 14 Apr 2017 18:12:11 +0000 Subject: [PATCH] [clang-move] Create ClangMoveActionFactory on stack This diff removes unnecessary using of unique_ptr with ClangMoveActionFactory (pico cleanup). NFC Test plan: make check-clang-tools Differential revision: https://reviews.llvm.org/D32063 llvm-svn: 300356 --- clang-tools-extra/clang-move/tool/ClangMoveMain.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/clang-tools-extra/clang-move/tool/ClangMoveMain.cpp b/clang-tools-extra/clang-move/tool/ClangMoveMain.cpp index 6a9676ec2e3e..2c898420ca21 100644 --- a/clang-tools-extra/clang-move/tool/ClangMoveMain.cpp +++ b/clang-tools-extra/clang-move/tool/ClangMoveMain.cpp @@ -127,10 +127,9 @@ int main(int argc, const char **argv) { move::ClangMoveContext Context{Spec, Tool.getReplacements(), InitialDirectory.str(), Style, DumpDecls}; move::DeclarationReporter Reporter; - auto Factory = llvm::make_unique( - &Context, &Reporter); - - int CodeStatus = Tool.run(Factory.get()); + move::ClangMoveActionFactory Factory(&Context, &Reporter); + + int CodeStatus = Tool.run(&Factory); if (CodeStatus) return CodeStatus;