[PATCH] clang-modernize: Add SubprocessCompilationDatabase

Guillaume Papin guillaume.papin at epitech.eu
Tue Oct 8 14:28:52 PDT 2013



================
Comment at: clang-modernize/tool/ClangModernize.cpp:229-231
@@ +228,5 @@
+                                        std::string &ErrorMessage) {
+  CompilationDatabase *Result =
+      FixedCompilationDatabase::loadFromCommandLine(Argc, Argv);
+  if (Result)
+    return Result;
----------------
I would merge these 2 lines, so the scope of Result is only the if and its body.

================
Comment at: clang-modernize/tool/ClangModernize.cpp:310
@@ -292,3 +309,3 @@
 
-  // Populate source files.
+  // Populate source files
   std::vector<std::string> Sources;
----------------
Any reason for this poor dot to disappear? Why here and not below: `// Enable timming.`, `// Report execution times.`, ...

================
Comment at: clang-modernize/Core/SubprocessCompilationDatabase.cpp:24
@@ +23,3 @@
+  SmallVector<StringRef, 16> C;
+  Command.split(C, " ", /* MaxSplit */-1, /* KeepEmpty */false);
+
----------------
This won't work as expected when dealing with paths that contains spaces no?


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



More information about the cfe-commits mailing list