Issue 175898
Summary [LifetimeSafety] False-negative for gsl::Pointer constructed from lifetimebound arg
Labels false-negative, clang:temporal-safety
Assignees
Reporter usx95
    https://godbolt.org/z/P4ca5foxM
```cpp
struct Bar {
  ~Bar();
};

struct [[gsl::Pointer]] Pointer {
  Pointer(const Bar & bar [[clang::lifetimebound]]);
};

Pointer test3(Bar bar) {
 return bar; // Should be an error for returning stack addr.
}
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to