================
@@ -525,3 +544,31 @@ void test() {
std::string_view svjkk1 = ReturnStringView(StrCat("bar", "x")); //
expected-warning {{object backing the pointer will be destroyed at the end of
the full-expression}}
}
} // namespace GH100549
+
+namespace GH100526 {
----------------
usx95 wrote:
Can you also add a use-after-return case:
```cpp
std::optional<std::string_view> uar() {
std::string s;
return s;
}
```
https://github.com/llvm/llvm-project/pull/107213
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits