This is an archive of the discontinued LLVM Phabricator instance.

[cmake] Refactor warning flag logic to use Unix warnings with clang-cl
ClosedPublic

Authored by rnk on Mar 15 2017, 11:41 AM.

Details

Summary

clang-cl understands the GCC-style -W[no-]foo flags, and for the most
part ignores MSVC -wd flags. So, let's pass the curated set of warning
flags we use on Unix on Windows. We can also stop passing /W4 -wd*,
which for the most part corresponds to -Wall -Wextra with a bunch of
flags that we mostly ignore.

I had to disable -Wnon-virtual-dtor on Windows, because it fires on
every COM class ever. I filed PR32286 to fix this.

So far I've only found two instances of -Wstring-conversion in the
WinASan code, which I'll fix. Other than that we seem clean.

Diff Detail

Repository
rL LLVM

Event Timeline

rnk created this revision.Mar 15 2017, 11:41 AM
hans accepted this revision.Mar 15 2017, 4:06 PM

lgtm

This revision is now accepted and ready to land.Mar 15 2017, 4:06 PM
This revision was automatically updated to reflect the committed changes.