[PATCH] Own/produce FrontendActionFactories by value, clang-tools-extra portion.

Manuel Klimek klimek at google.com
Thu Jun 26 10:04:27 PDT 2014


lg

================
Comment at: clang-modernize/Core/Transform.h:74
@@ -71,2 +73,3 @@
 };
 
+
----------------
Any reason to have 2 empty lines here?

================
Comment at: clang-modernize/LoopConvert/LoopConvert.cpp:51
@@ -50,3 +50,3 @@
 
-  if (int result = LoopTool.run(createActionFactory(Finder))) {
+  if (int result = LoopTool.run(ActionFactory(Finder, *this))) {
     llvm::errs() << "Error encountered during translation.\n";
----------------
Why not still call createActionFactory? (or delete createActionFactory)?

================
Comment at: clang-modernize/tool/ClangModernize.cpp:472
@@ -471,3 +471,3 @@
     ClangTool SyntaxTool(*Compilations, SourcePaths);
-    if (SyntaxTool.run(newFrontendActionFactory<SyntaxOnlyAction>().get()) != 0)
+    if (SyntaxTool.run(newFrontendActionFactory<SyntaxOnlyAction>()) != 0)
       return 1;
----------------
I think we'll not want to call it "new..." if it doesn't return a pointer. (I'd use "create" in that case).

http://reviews.llvm.org/D4312






More information about the cfe-commits mailing list