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

Rafael Auler rafaelauler at gmail.com
Wed Aug 13 22:25:35 PDT 2014


Hi rafael,

This is the Clang side of the patch in http://reviews.llvm.org/D4899

This patch aims at fixing PR17239.

Note: it depends on http://reviews.llvm.org/D4899 the llvm side of the patch, landing in the LLVM tree.

This bug happens because the /link (clang-cl.exe argument) is marked as "consume all remaining arguments". However, when inside a response file, /link should only consume all remaining arguments inside the response file where it is located, not the entire command line after expansion. The LLVM side of the patch will change the semantics of the RemainingArgsClass kind to always consume only until the end of the response file when the option originally came from a response file. There are only two options in this class: dash dash (--) and /link.

In the Clang side, I just used the ExpandedArgs class created in the LLVM side of the patch to fix this bug.

http://reviews.llvm.org/D4900

Files:
  include/clang/Driver/Driver.h
  lib/Driver/Driver.cpp
  test/Driver/cl-link-at-file.c
  tools/driver/cc1_main.cpp
  tools/driver/cc1as_main.cpp
  tools/driver/driver.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4900.12487.patch
Type: text/x-patch
Size: 14161 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140814/ecc65fdf/attachment.bin>


More information about the cfe-commits mailing list