[PATCH] Fix PR17239 by changing the semantics of the RemainingArgsClass Option kind (clang side)

Reid Kleckner rnk at google.com
Fri Aug 22 14:53:32 PDT 2014


Landed in r216281.

================
Comment at: tools/driver/driver.cpp:406-409
@@ -391,1 +405,6 @@
+    // Remove markers, if we added them
+    if (MarkEOLs) {
+      auto newEnd = std::remove(argv.begin(), argv.end(), nullptr);
+      argv.resize(newEnd - argv.begin());
+    }
     return ExecuteCC1Tool(argv, argv[1] + 4);
----------------
Rafael Auler wrote:
> Reid Kleckner wrote:
> > This seems impossible. If we invoked a cc1 tool, we shouldn't have added EOL markers, right?
> I made this check just in case the user puts "-cc1" as a first argument in a response file. In this case, MarkEOLs would be true. After expanding the response files, we would end up here with MarkEOLs true (a contrived example, but possible).
OK, I added a test case for it and will commit it soon.

http://reviews.llvm.org/D4900






More information about the cfe-commits mailing list