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

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 11 14:59:28 PDT 2017


rjmccall added a comment.

In https://reviews.llvm.org/D33826#866170, @lebedev.ri wrote:

> In https://reviews.llvm.org/D33826#866161, @JonasToth wrote:
>
> > There is an exception to the general rule (EXP36-C-EX2), stating that the result of `malloc` and friends is allowed to be casted to stricter alignments, since the pointer is known to be of correct alignment.
>


In practice, are there any malloc declarations still in use that return char* instead of void*?  I assume this does not complain when the source is void*.


Repository:
  rL LLVM

https://reviews.llvm.org/D33826





More information about the cfe-commits mailing list