================
@@ -780,3 +780,30 @@ void test13() {
 }
 
 } // namespace GH100526
+
+namespace test {
+
+struct [[gsl::Pointer]] FooOwner {};
+struct [[gsl::Pointer]] FooPointer {
+  FooPointer(const FooOwner&);
+};
+
+template<typename T>
+struct [[gsl::Owner]] Container {
+  const T& get() const [[clang::lifetimebound]];
+};
+
+FooPointer func() {
----------------
Xazax-hun wrote:

Would we still warn after this fix if we returned `FooPointer&`?

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