[PATCH] D30992: [cmake] Refactor warning flag logic to use Unix warnings with clang-cl

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 15 11:41:44 PDT 2017


rnk created this revision.
Herald added a subscriber: mgorny.

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 /https://reviews.llvm.org/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.


https://reviews.llvm.org/D30992

Files:
  cmake/modules/HandleLLVMOptions.cmake

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30992.91909.patch
Type: text/x-patch
Size: 17753 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170315/a7d483b3/attachment.bin>


More information about the llvm-commits mailing list