[PATCH] D48866: [clang-tidy] Add incorrect-pointer-cast checker
Roman Lebedev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 3 07:59:35 PDT 2019
lebedev.ri added a comment.
Also, this kinda feels like this shouldn't be a single check.
1. I'm very much looking forward the alignment part of this, the `reinterpret_cast<>()` specifically. It would be good to have a switch to also diagnose casts from `void*` here. But indeed, if it comes from c-style cast, `-Wcast-align` will already have diagnosed it.
2. Then there is 'cast increases type width' check, makes sense i suppose.
3. 'struct layout mismatch', makes sense.
4. I don't understand the 'different signdness' part.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D48866/new/
https://reviews.llvm.org/D48866
More information about the cfe-commits
mailing list