[PATCH] D33826: [clang-tidy] avoid pointer cast to more strict alignment check

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 30 07:43:27 PDT 2017


lebedev.ri added a subscriber: rjmccall.
lebedev.ri added a comment.

In https://reviews.llvm.org/D33826#856619, @Eugene.Zelenko wrote:

> In https://reviews.llvm.org/D33826#856610, @lebedev.ri wrote:
>
> > Any status update here? :)
> >  I generally do see a benefit in this check, because `-Wcast-align` (at least currently?) does not warn on `reinterpret_cast<>()`.
>
>
> I think will be good idea to extend -Wcast-align.


Hm, are you *sure* `reinterpret_cast<>()` is not allowed to increase alignment?
There was a commit that intentionally removed that warning: (by @rjmccall, i believe)
https://github.com/llvm-mirror/clang/commit/35a38d95da89d48778019c37b5f8c9a20f7e309c


Repository:
  rL LLVM

https://reviews.llvm.org/D33826





More information about the cfe-commits mailing list