[PATCH] clang-modernize: Apply replacements using clang-apply-replacements

Edwin Vane edwin.vane at intel.com
Fri Oct 4 11:08:41 PDT 2013



================
Comment at: clang-modernize/Core/ReplacementHandling.cpp:108
@@ +107,3 @@
+  bool ExecutionFailed = false;
+  int ReturnCode = ExecuteAndWait(CARPath.c_str(), Argv.data(), /* env */ 0,
+                                  /* redirects */ 0,
----------------
Tareq A. Siraj wrote:
> Wondering if we should pass the environment of current process to the child to be safe. Does it use any pre-processing stuff? The pre-processor I think uses CPATH and some other environment vars.
If we don't pass the environment it's inherited from the parent process.

================
Comment at: clang-modernize/Core/ReplacementHandling.cpp:90
@@ +89,3 @@
+bool ReplacementHandling::applyReplacements() {
+  SmallVector<const char *, 16> Argv;
+  Argv.push_back(CARPath.c_str());
----------------
Tareq A. Siraj wrote:
> Do we need a initial length of 16? Looks like we are only using 7 and unlikely this will change soon. Suggest setting it to 8 for now.
sure.


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



More information about the cfe-commits mailing list