This is an archive of the discontinued LLVM Phabricator instance.

[clang-cl] Let /W4 map to -Wall -Wextra instead of just -Wall.
ClosedPublic

Authored by thakis on Dec 8 2015, 2:02 PM.

Details

Reviewers
hans
Summary

There's no way to make a flag alias to two flags, so add a /WCL4 flag that maps to the All, Extra diag groups.

Fixes PR25563.

Diff Detail

Event Timeline

thakis updated this revision to Diff 42218.Dec 8 2015, 2:02 PM
thakis retitled this revision from to [clang-cl] Let /W4 map to -Wall -Wextra instead of just -Wall..
thakis updated this object.
thakis added a reviewer: hans.
thakis added a subscriber: cfe-commits.
hans accepted this revision.Dec 8 2015, 2:06 PM
hans edited edge metadata.

There's no way to make a flag alias to two flags

Well, at least not with the alias mechanism in the option parser, but David pointed out we could expand it manually in MSVCToolChain::TranslateArgs.

Both alternatives are kind of annoying.. I especially don't like the idea of iterating over all the flags a bunch of time, so maybe this approach is better. lgtm.

This revision is now accepted and ready to land.Dec 8 2015, 2:06 PM
thakis closed this revision.Dec 11 2015, 2:35 PM

r255382, thanks!