[qt/clang/llvm]: Summary of bulk changes made

KDE Git Services - Bulk Change <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git repository change summary for qt/clang/llvm
Pushed by mirror-service into branch 'upstream/users/yuxuanchen1997/fix-cwg1815-lambda-capture-cleanup'.
Changed from 4b80bb0705558ad96eff4f46800ce6aee35ad87b to 92de2ae41133a5cf87c6b91286895313f5db837a
Acknowledgement was received that this change introduces only existing code that has been pushed to another public open source repository.

This change contains the following new commits:

Git commit 92de2ae41133a5cf87c6b91286895313f5db837a by Yuxuan Chen on 21/07/2026 at 22:48..
[Clang] Re-run init-capture initialization when rebuilding default member initializers

When a default member initializer containing a lambda is rebuilt at its
point of use (CWG1815/CWG2631 aggregate initialization),
EnsureImmediateInvocationInDefaultArgs::TransformLambdaExpr transformed
each init-capture initializer with TransformInitializer but never
re-performed the capture's initialization.

TransformInitializer lowers an initializer to its syntactic form -- a
stripped source expression for copy-init, a ParenListExpr for
direct-init, or an InitListExpr for list-init -- and expects the
enclosing context to rebuild the initialization against the target
entity. Without that second step the rebuilt closure was left with a
bare capture initializer: CodeGen crashed for a trivially destructible
closure (aggregate-copy of a non-trivially copyable type) and silently
left the capture uninitialized otherwise.

Re-run buildLambdaInitCaptureInitialization on the transformed
initializer, as the canonical TreeTransform::TransformLambdaExpr does, so
the rebuilt closure still constructs its captured members while reusing
the existing closure type, capture declarations, and body.

Fixes the crash reported on #196597.

Add a CodeGenCXX regression test covering copy-, direct-, and list-init
captures and a non-trivially destructible closure.
https://invent.kde.org/qt/clang/llvm/-/commit/92de2ae41133a5cf87c6b91286895313f5db837a
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.