| Issue |
81589
|
| Summary |
[[lifetimebound]] basic members tracking
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
DenisYaroshevskiy
|
Hi!
Would be amazing if the following is caught to:
https://godbolt.org/z/5ze9s5roj
```
#include <utility>
struct Struct {
std::pair<int, int> member;
const auto* foo() const [[clang::lifetimebound]] { return &member; }
};
int main() {
// auto& caught = *Struct().foo();
auto& not_caught = Struct().foo()->second; // this is a bug
(void)not_caught;
}
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs