[PATCH] D71707: clang-tidy: new bugprone-pointer-cast-widening

Eugene Zelenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 19 13:32:26 PST 2019


Eugene.Zelenko added inline comments.


================
Comment at: clang-tools-extra/docs/ReleaseNotes.rst:100
+
+  Check for cast of a pointer to wider (even unsigned) integer. This will
+  sign-extend the pointer which happens on 32-bit hosts for 64-bit integers.
----------------
Checks. One sentence should be enough.


================
Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-pointer-cast-widening.cpp:5
+
+void test(void) {
+  void *p = 0;
----------------
void is unnecessary. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71707





More information about the cfe-commits mailing list