llvm-project
llvm-project copied to clipboard
[LifetimeSafety] Origin length mismatch (assertion) in `VisitInitListExpr` when constructing `gsl::Pointer`
Minimal repro:
struct [[gsl::Pointer()]] Ptr { int x; };
Ptr f() { return Ptr{}; }
https://godbolt.org/z/vbb56GeeT
This was found by a local Qwen 3.6 35B3A while testing one of my PRs.
I would also like to work on this myself.
@llvm/issue-subscribers-clang-temporal-safety
Author: NeKon69
Minimal repro:
```cpp
struct [[gsl::Pointer()]] Ptr { int x; };
struct Owner { int y; };
Ptr f(Owner o) { return Ptr{}; }
```
https://godbolt.org/z/vbb56GeeT
This was found by a local Qwen 3.6 35B3A while testing one of my PRs.