================
@@ -943,3 +943,73 @@ void parentheses(bool cond) {
} // expected-note 4 {{destroyed here}}
(void)*p; // expected-note 4 {{later used here}}
}
+
+//===----------------------------------------------------------------------===//
+// Lifetimebound Annotation Suggestion Tests
+//===----------------------------------------------------------------------===//
+
+View return_view_directly (View a // expected-warning {{param should be marked
[[clang::lifetimebound]]}}.
----------------
usx95 wrote:
nit: formatting: Let's keep the `) {` after the last parameter
```cpp
View return_view_directly (View a) { // expected-warning {{param should be
marked [[clang::lifetimebound]]}}.
return a; // expected-note {{param escapes here}}
}
```
Similarly for rest of the cases.
https://github.com/llvm/llvm-project/pull/169767
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits