[clang-tools-extra] r300356 - [clang-move] Create ClangMoveActionFactory on stack

Alexander Shaposhnikov via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 14 11:12:11 PDT 2017


Author: alexshap
Date: Fri Apr 14 13:12:11 2017
New Revision: 300356

URL: http://llvm.org/viewvc/llvm-project?rev=300356&view=rev
Log:
[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

Modified:
    clang-tools-extra/trunk/clang-move/tool/ClangMoveMain.cpp

Modified: clang-tools-extra/trunk/clang-move/tool/ClangMoveMain.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-move/tool/ClangMoveMain.cpp?rev=300356&r1=300355&r2=300356&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-move/tool/ClangMoveMain.cpp (original)
+++ clang-tools-extra/trunk/clang-move/tool/ClangMoveMain.cpp Fri Apr 14 13:12:11 2017
@@ -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<clang::move::ClangMoveActionFactory>(
-      &Context, &Reporter);
-
-  int CodeStatus = Tool.run(Factory.get());
+  move::ClangMoveActionFactory Factory(&Context, &Reporter);
+  
+  int CodeStatus = Tool.run(&Factory);
   if (CodeStatus)
     return CodeStatus;
 




More information about the cfe-commits mailing list