[PATCH] D32063: [clang-move] cleanup: create ClangMoveActionFactory on the stack

Alexander Shaposhnikov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 13 16:48:15 PDT 2017


alexshap created this revision.
alexshap created this object with visibility "All Users".

This diff removes unnecessary using of unique_ptr with ClangMoveActionFactory (pico cleanup).
NFC


Repository:
  rL LLVM

https://reviews.llvm.org/D32063

Files:
  tool/ClangMoveMain.cpp


Index: tool/ClangMoveMain.cpp
===================================================================
--- tool/ClangMoveMain.cpp
+++ tool/ClangMoveMain.cpp
@@ -127,10 +127,9 @@
   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;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32063.95233.patch
Type: text/x-patch
Size: 654 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170413/1b2fe076/attachment.bin>


More information about the cfe-commits mailing list