summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorCorentin Jabot <corentinjabot@gmail.com>2022-10-23 17:32:58 +0200
committerCorentin Jabot <corentinjabot@gmail.com>2022-11-04 07:58:57 +0100
commitbf1e235695a7acdc3e868217e69d5b31ada06cb3 (patch)
tree7bb66ed0a5b0997f6931aab88af430d391174b9d /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent902ba8b0c9b013043aa04dc548be3ec907ef5571 (diff)
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/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions