HomePhabricator

[Tooling] Improve handling of CL-style options

Description

[Tooling] Improve handling of CL-style options

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. /W4 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.

Differential Revision: https://reviews.llvm.org/D51321

Details

Committed
hamzasoodSep 9 2018, 5:06 AM
Differential Revision
D51321: [Tooling] Improve handling of CL-style options
Parents
rL341759: Speculative fix for NetBSD bot for r341758
Branches
Unknown
Tags
Unknown