[clang] Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (PR #97308)

Martin Storsjö via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 9 03:18:03 PDT 2024


mstorsjo wrote:

This PR triggers failed asserts. This is reproducible with https://martin.st/temp/qtdeclarative-repro1.cpp, like this:
```
$ clang -target aarch64-w64-mingw32 -c qtdeclarative-repro1.cpp
Assertion failed: ((ND->isUsed(false) || !isa<VarDecl>(ND) || E->isNonOdrUse() || !E->getLocation().isValid()) && "Should not use decl without marking it used!"), function EmitDeclRefLValue, file /home/martin/code/llvm-project/clang/lib/CodeGen/CGExpr.cpp, line 3107.
```
(This file isn't the final reduced form, but creduce seems to be running quite slowly on this file, so it's a partially reduced testcase.)

https://github.com/llvm/llvm-project/pull/97308


More information about the cfe-commits mailing list