diff options
author | Corentin Jabot <corentinjabot@gmail.com> | 2022-10-23 17:32:58 +0200 |
---|---|---|
committer | Corentin Jabot <corentinjabot@gmail.com> | 2022-11-30 11:25:01 +0100 |
commit | 26fa17ed2914bd80c066d36b325fd3104e45554c (patch) | |
tree | 207d6c5dea565ffc022eb1015c63ce11b3f66d1b /flang/lib/Frontend/CompilerInvocation.cpp | |
parent | 451c017a32695ee62c0ae6de6401d89cd9bd9555 (diff) | |
download | llvm-26fa17ed2914bd80c066d36b325fd3104e45554c.zip llvm-26fa17ed2914bd80c066d36b325fd3104e45554c.tar.gz llvm-26fa17ed2914bd80c066d36b325fd3104e45554c.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 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions