[PATCH] Transform all files in a compilation database if no source files are provided.

Guillaume Papin guillaume.papin at epitech.eu
Wed Sep 4 12:30:08 PDT 2013


  No big comments overall but I was thinking that you probably want to update the Migrator usage, see: http://clang.llvm.org/extra/ModernizerUsage.html#clang-modernize-usage


================
Comment at: cpp11-migrate/tool/Cpp11Migrate.cpp:42
@@ -41,3 +41,3 @@
 static cl::list<std::string> SourcePaths(
-    cl::Positional, cl::desc("<source0> [... <sourceN>]"), cl::OneOrMore);
+    cl::Positional, cl::desc("[<source0> ... <sourceN>]"), cl::ZeroOrMore);
 static cl::extrahelp MoreHelp(
----------------
Maybe you can cut it down to `[<sources..>]` (no strong opinion about this).

================
Comment at: cpp11-migrate/tool/Cpp11Migrate.cpp:247-248
@@ +246,4 @@
+      !GlobalOptions.ModifiableFiles.isExcludeListEmpty())
+    for (std::vector<std::string>::iterator I = SourcePaths.begin();
+       I != SourcePaths.end();)
+      if (GlobalOptions.ModifiableFiles.isFileExplicitlyExcluded(*I)) {
----------------
Is this line correctly formatted?

================
Comment at: cpp11-migrate/tool/Cpp11Migrate.cpp:264
@@ +263,3 @@
+        std::vector<std::string> Files = Compilations->getAllFiles();
+        for (std::vector<std::string>::iterator I = Files.begin(),
+                                                E = Files.end();
----------------
const_iterator maybe?


http://llvm-reviews.chandlerc.com/D1517



More information about the cfe-commits mailing list