[PATCH] D51321: [Tooling] Improve handling of CL-style options

Hamza Sood via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 27 14:05:33 PDT 2018

hamzasood created this revision.
hamzasood added reviewers: rnk, hokein, sammccall.
Herald added a subscriber: cfe-commits.

This patch fixes the handling of clang-cl options in `InterpolatingCompilationDatabase`.
They were previously ignored completely, which led to a lot of bugs:

- Additional options were being added with the wrong syntax. E.g. a file was specified as C++ by adding `-x c++`, which causes an error in CL mode.
- The args were parsed and then rendered, which means that the aliasing information was lost. E.g. `/W3` was rendered to `-Wall`, which in CL mode means `-Weverything`.
- CL options were ignored when checking things like `-std=`, so a lot of logic was being bypassed.

  rC Clang



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51321.162743.patch
Type: text/x-patch
Size: 15290 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180827/1241726d/attachment-0001.bin>

More information about the cfe-commits mailing list