[clang-tools-extra] r249399 - Add a new module for the C++ Core Guidelines, and the first checker for those guidelines: cppcoreguidelines-pro-type-reinterpret-cast.

Joerg Sonnenberger via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 7 09:05:57 PDT 2015


On Tue, Oct 06, 2015 at 01:31:01PM -0000, Aaron Ballman via cfe-commits wrote:
> Log:
> Add a new module for the C++ Core Guidelines, and the first checker
> for those guidelines: cppcoreguidelines-pro-type-reinterpret-cast.

I wonder about the generality of this. Does it really make sense to flag
every reinterpret_cast of a void pointer? Such interface contracts
normally don't give you an alternative, so it seems a bit silly. This is
made worse by the concrete message used...

More importantly, can the checker detect all cases where
reinterpret_cast is used where a less generic cast applies?

Joerg


More information about the cfe-commits mailing list