aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/TargetParserTest.cpp
diff options
context:
space:
mode:
authorCorentin Jabot <corentinjabot@gmail.com>2022-10-23 17:32:58 +0200
committerCorentin Jabot <corentinjabot@gmail.com>2022-12-08 10:32:54 +0100
commita96a6ed83230265f3eab09a94f0e9525d05f8a74 (patch)
tree7c6386ef38ed8f112eeba89a90e2449d48739aa5 /llvm/unittests/Support/TargetParserTest.cpp
parent6a35815c73ecce7e1dfd9f54535c7c17878a459a (diff)
downloadllvm-a96a6ed83230265f3eab09a94f0e9525d05f8a74.zip
llvm-a96a6ed83230265f3eab09a94f0e9525d05f8a74.tar.gz
llvm-a96a6ed83230265f3eab09a94f0e9525d05f8a74.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/unittests/Support/TargetParserTest.cpp')
0 files changed, 0 insertions, 0 deletions