================
@@ -89,6 +89,18 @@ void test_getView_on_temporary() {
(void)sv;
}
+//===----------------------------------------------------------------------===//
+// Annotation Inference Test Cases
+//===----------------------------------------------------------------------===//
+
+View return_view_by_func (View a) { // expected-warning {{param should be
marked [[clang::lifetimebound]]}}.
+ return return_view_directly(a); // expected-note {{param returned here}}
+}
+
+MyObj* return_pointer_by_func (MyObj* a) { // expected-warning {{param
should be marked [[clang::lifetimebound]]}}.
+ return return_pointer_object(a); // expected-note {{param
returned here}}
+}
----------------
kashika0112 wrote:
Done
https://github.com/llvm/llvm-project/pull/171081
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits