Look through calls to std::addressof to compute pointer alignment.
authorEli Friedman <efriedma@quicinc.com>
Mon, 18 Apr 2022 17:19:57 +0000 (10:19 -0700)
committerEli Friedman <efriedma@quicinc.com>
Wed, 20 Apr 2022 18:30:11 +0000 (11:30 -0700)
commitecc8479a01d3bee1c145a0f7990271651db72ab0
treebdd1f3d71ad665237c68060703692085ac306bc1
parent61e36e87df1a4ad11f752d66c90e124101fe4023
Look through calls to std::addressof to compute pointer alignment.

This is sort of a followup to D37310; that basically fixed the same
issue, but then the libstdc++ implementation of <atomic> changed. Re-fix
the the issue in essentially the same way: look through the addressof
operation to find the alignment of the underlying object.

Differential Revision: https://reviews.llvm.org/D123950
clang/lib/CodeGen/CGExpr.cpp
clang/test/CodeGenCXX/atomic-align.cpp