[clang] `aligned_alloc` allocation function specifies alignment in first arg, manifes...
authorRoman Lebedev <lebedev.ri@gmail.com>
Fri, 10 Sep 2021 17:20:10 +0000 (20:20 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Fri, 10 Sep 2021 17:49:29 +0000 (20:49 +0300)
commitf3c2094d8c112f40923ef45953f66c4b2ecb6d01
treea0dfca9bb77704f6b2d9bb225007bd11f3d09077
parent85ba583eba1902c386a55f5565f3c721bd6bcb23
[clang] `aligned_alloc` allocation function specifies alignment in first arg, manifest that knowledge

Mainly, if a constant value was passed as an alignment,
then we correctly annotate the alignment of the returned value
of @aligned_alloc. And if it wasn't constant,
then we also don't loose that, but emit an assumption.
clang/lib/Sema/SemaDecl.cpp
clang/test/CodeGen/alloc-fns-alignment.c