hokein wrote:

Just discover a new false positive:

```
namespace std {
template <typename T>
class [[gsl::Pointer]] Iterator2 {
 public:
  using reference = T&;
  Iterator2() {}
  reference operator*() const;
};
}

template <typename T>
class AnySpan {
 public:
  AnySpan() {}
  std::Iterator2<T> begin() const [[clang::lifetimebound]];
};

AnySpan<int> MakeAnySpan();
void s() {
  const int& t2 = *AnySpan<int>().begin();  // false positive, warning.
}
```

https://github.com/llvm/llvm-project/pull/114044
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to