================
@@ -411,3 +411,22 @@ void use() {
 }
 } // namespace with_span
 } // namespace inferred_capture_by
+
+namespace on_constructor {
+struct T {
+  T(const int& t [[clang::lifetime_capture_by(this)]]);
+};
+struct T2 {
+  T2(const int& t [[clang::lifetime_capture_by(x)]], int& x);
+};
+int foo(const T& t);
----------------
usx95 wrote:

could you also add
```cpp
int bar(const T& t[[clang::lifetimebound]]);
auto y = bar(T(1));
```
```cpp
struct T3 {
T3(const T& t [[clang::lifetime_capture_by(this));
};
T3 t3(T(1));
```

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

Reply via email to