[PATCH] D14096: [clang-tidy] add new check cppcoreguidelines-pro-type-cstyle-cast
Samuel Benzaquen via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 27 11:10:26 PDT 2015
sbenza added a comment.
In http://reviews.llvm.org/D14096#275902, @xazax.hun wrote:
> There is already a similar check in the Google package. What are the differences between those two checks? What is the reason we can not just register that check into the core guidelines module?
That other check discourages c-style cast in favor of C++ style casts, even if it is a reinterpret_cast. It simply replaces the cstyle cast with an equivalent C++ one. It is basically a stylistic check.
This check will warn unsafe cstyle casts, while allowing safe ones like int->uint casts.
This one is a safety related check.
http://reviews.llvm.org/D14096
More information about the cfe-commits
mailing list