[all-commits] [llvm/llvm-project] cca54e: Revert "Reapply "[Clang][CWG1815] Support lifetime...
Martin Storsjö via All-commits
all-commits at lists.llvm.org
Mon Sep 9 05:11:05 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: cca54e347ac34912cdfb9983533c61836db135e0
https://github.com/llvm/llvm-project/commit/cca54e347ac34912cdfb9983533c61836db135e0
Author: Martin Storsjö <martin at martin.st>
Date: 2024-09-09 (Mon, 09 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
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:
-----------
Revert "Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (#97308)"
This reverts commit 45c8766973bb3bb73dd8d996231e114dcf45df9f
and 049512e39d96995cb373a76cf2d009a86eaf3aab.
This change triggers failed asserts on inputs like this:
struct a {
} constexpr b;
class c {
public:
c(a);
};
class B {
public:
using d = int;
struct e {
enum { f } g;
int h;
c i;
d j{};
};
};
B::e k{B::e::f, int(), b};
Compiled like this:
clang -target x86_64-linux-gnu -c repro.cpp
clang: ../../clang/lib/CodeGen/CGExpr.cpp:3105: clang::CodeGen::LValue
clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(const clang::DeclRefExpr*):
Assertion `(ND->isUsed(false) || !isa<VarDecl>(ND) || E->isNonOdrUse() ||
!E->getLocation().isValid()) && "Should not use decl without marking it used!"' failed.
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