fix performance-no-int-to-ptr
Reference issue
What does this implement/fix?
Clang tidy complains about casting pointers to integer types. We do this this in aligned_alloca
to perform some intermediate pointer arithmetic. alloca
is a bit unwieldy as the memory is free'd after leaving the function, but this solution seems to work.
The example here is exactly what we're doing in Eigen. https://clang.llvm.org/extra/clang-tidy/checks/performance/no-int-to-ptr.html