[PATCH] D72231: [Sema] Adds the pointer-to-int-cast diagnostic

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 4 12:12:54 PST 2020


rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.

Looks fine.

Would it make sense to put the MS extension warning into the `-Wpointer-to-int-cast` group so that we can control this warning consistently across platforms? You could get that effect by introducing a new warning group (eg, "-Wmicrosoft-pointer-to-int-cast") containing just the `ExtWarn` warning, and putting that group in both `MicrosoftCast` and `PointerToIntCast`.



================
Comment at: clang/test/Sema/cast.c:1
-// RUN: %clang_cc1 -fsyntax-only -triple x86_64-unknown-unknown %s -verify
+// RUN: %clang_cc1 -fsyntax-only -triple x86_64-unknown-unknown -Wpointer-to-int-cast %s -verify
 
----------------
Don't specify the warning flag here, so that we have some test coverage that this is enabled by default.


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

https://reviews.llvm.org/D72231





More information about the cfe-commits mailing list