[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 05:11:49 PDT 2024


mstorsjo wrote:

I pushed a revert now.

My reduction did complete in the end - it's reproducible with a small snippet like this:
```c++
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
```

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


More information about the cfe-commits mailing list