[PATCH] D75752: [Sema] Move pointer to int cast warnings under -Wmicrosoft-cast

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 6 13:15:50 PST 2020


rnk added a comment.

I agree with the reasoning, but this is likely to fire all over existing C++ code. In fact, the one we just added finds issues in Chrome
https://ci.chromium.org/p/chrome/builders/ci/ToTWin/5879
../../base/debug/close_handle_hook_win.cc(155,16): error: cast to smaller integer type 'unsigned long' from 'void *'

The idea was that -Wpointer-int-cast was a new warning group, so it was fine to add new findings to it, but -Wmicrosoft-cast already exists. In this case, I would recommend adding some new -W flag.

As for naming, -Wmicrosoft-pointer-to-int? It can still be a subgroup of -Wmicrosoft-cast.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75752/new/

https://reviews.llvm.org/D75752





More information about the cfe-commits mailing list