[clang] [coroutines][coro_lifetimebound] Detect lifetime issues with lambda captures (PR #77066)

Chuanqi Xu via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 14 19:31:18 PST 2024


================
@@ -1796,6 +1797,32 @@ bool CoroutineStmtBuilder::makeOnException() {
   return true;
 }
 
+// Adds [[clang::coro_wrapper]] and [[clang::coro_disable_lifetimebound]]
+// attributes to the function `get_return_object`.
----------------
ChuanqiXu9 wrote:

```suggestion
// attributes to the function `get_return_object` if its return type is marked with `[[clang::coro_return_type]]` to avoid false-positive diagnostic for `get_return_object`.
```

https://github.com/llvm/llvm-project/pull/77066


More information about the cfe-commits mailing list