Closed
Description
struct MyThing {
const std::string& s;
};
MyThing makeThing(std::string s) {
return MyThing(s);
}
https://godbolt.org/z/6335YcKMM
This also doesn't work for gsl::Pointer
types like string_view
instead of const std::string&
. https://godbolt.org/z/8bcaxTqjY
This is different from #58985. This still only needs stmt-local analysis and has probably a simple fix.