diff options
author | Corentin Jabot <corentinjabot@gmail.com> | 2022-10-23 17:32:58 +0200 |
---|---|---|
committer | Corentin Jabot <corentinjabot@gmail.com> | 2022-12-09 10:25:44 +0100 |
commit | c9a6713b4788f10b81202b70993068e475b392f7 (patch) | |
tree | 92513b25467cb4ee5553ceef43a1ac6a046896e2 /llvm/lib/Object/MachOObjectFile.cpp | |
parent | 6827934ee0afcf9478f36291b3b5e947fe6d0036 (diff) | |
download | llvm-c9a6713b4788f10b81202b70993068e475b392f7.zip llvm-c9a6713b4788f10b81202b70993068e475b392f7.tar.gz llvm-c9a6713b4788f10b81202b70993068e475b392f7.tar.bz2 |
Implement CWG2631
Implement https://cplusplus.github.io/CWG/issues/2631.html.
Immediate calls in default arguments and defaults members
are not evaluated.
Instead, we evaluate them when constructing a
`CXXDefaultArgExpr`/`BuildCXXDefaultInitExpr`.
The immediate calls are executed by doing a
transform on the initializing expression.
Note that lambdas are not considering subexpressions so
we do not need to transform them.
As a result of this patch, unused default member
initializers are not considered odr-used, and
errors about members binding to local variables
in an outer scope only surface at the point
where a constructor is defined.
Reviewed By: aaron.ballman, #clang-language-wg
Differential Revision: https://reviews.llvm.org/D136554
Diffstat (limited to 'llvm/lib/Object/MachOObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions