| Issue | 177604 |
|---|---|
| Summary | False-positive for reference-type field |
| Labels | new issue |
| Assignees | |
| Reporter | usx95 |
```cpp
#include <string>
#include <string_view>
struct S {
std::string& str_ref;
};
std::string_view foo(S s) {
return s.str_ref; // error: address of 's' escapes. Bad!
}
```
https://godbolt.org/z/baced49s7
_______________________________________________ llvm-bugs mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
