================
@@ -12,14 +22,32 @@ struct [[gsl::Pointer()]] View {
   void use() const;
 };
 
-View return_view_directly (View a) {    // expected-warning {{param should be 
marked [[clang::lifetimebound]]}}.
+View return_view_directly(View a); // expected-warning {{parameter in cross-TU 
function should be marked [[clang::lifetimebound]]}}
+
+View conditional_return_view(
+  View a,        // expected-warning {{parameter in cross-TU function should 
be marked [[clang::lifetimebound]]}}
+  View b,        // expected-warning {{parameter in cross-TU function should 
be marked [[clang::lifetimebound]]}}
+  bool c);
+
+int* return_pointer_directly(int* a);  // expected-warning {{parameter in 
cross-TU function should be marked [[clang::lifetimebound]]}}
+
+MyObj* return_pointer_object(MyObj* a); // expected-warning {{parameter in 
cross-TU function should be marked [[clang::lifetimebound]]}}
----------------
usx95 wrote:

Can you also use these in the `.cc` file to verify if we correctly infer the 
annotations.

https://github.com/llvm/llvm-project/pull/171972
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to