[all-commits] [llvm/llvm-project] 060137: Reapply "[Clang][CWG1815] Support lifetime extensi...
yronglin via All-commits
all-commits at lists.llvm.org
Wed Sep 11 15:30:09 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 060137038ab9246b377e190ae3c6f272fa57cbfc
https://github.com/llvm/llvm-project/commit/060137038ab9246b377e190ae3c6f272fa57cbfc
Author: yronglin <yronglin777 at gmail.com>
Date: 2024-09-12 (Thu, 12 Sep 2024)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/include/clang/Basic/DiagnosticSemaKinds.td
M clang/include/clang/Sema/Sema.h
M clang/lib/Parse/ParseDecl.cpp
M clang/lib/Sema/CheckExprLifetime.cpp
M clang/lib/Sema/SemaExpr.cpp
M clang/lib/Sema/SemaExprCXX.cpp
M clang/lib/Sema/SemaInit.cpp
M clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
M clang/lib/Sema/TreeTransform.h
M clang/test/AST/ast-dump-default-init-json.cpp
M clang/test/AST/ast-dump-default-init.cpp
M clang/test/Analysis/lifetime-extended-regions.cpp
M clang/test/CXX/drs/cwg16xx.cpp
M clang/test/CXX/drs/cwg18xx.cpp
M clang/test/CXX/special/class.temporary/p6.cpp
A clang/test/SemaCXX/PR97308.cpp
M clang/test/SemaCXX/constexpr-default-arg.cpp
M clang/test/SemaCXX/cxx11-default-member-initializers.cpp
M clang/test/SemaCXX/eval-crashes.cpp
M clang/www/cxx_dr_status.html
Log Message:
-----------
Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (#108039)
The PR reapply https://github.com/llvm/llvm-project/pull/97308.
- Implement [CWG1815](https://wg21.link/CWG1815): Support lifetime
extension of temporary created by aggregate initialization using a
default member initializer.
- Fix crash that introduced in
https://github.com/llvm/llvm-project/pull/97308. In
`InitListChecker::FillInEmptyInitForField`, when we enter
rebuild-default-init context, we copy all the contents of the parent
context to the current context, which will cause the `MaybeODRUseExprs`
to be lost. But we don't need to copy the entire context, only the
`DelayedDefaultInitializationContext` was required, which is used to
build `SourceLocExpr`, etc.
---------
Signed-off-by: yronglin <yronglin777 at gmail.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list