Closed
Description
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;
}
Metadata
Metadata
Assignees
Type
Projects
Status
Done