[clang-tools-extra] [clang-tidy] Add support for use-after-suspend to bugprone-use-after-move (PR #172566)

via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 5 12:04:49 PST 2026


================
@@ -254,6 +255,17 @@ forget to add the reinitialization for this additional member. Instead, it is
 safer to assign to the entire struct in one go, and this will also avoid the
 use-after-move warning.
 
+Coroutines
+----------
+
+This check also searches for occurrences of "use-after-suspend" in C++
+coroutines. This can be used, for example, to detect when a coroutine accesses
+thread-local data after a suspension point (i.e. `co_yield` or `co_await`),
----------------
EugeneZelenko wrote:

```suggestion
thread-local data after a suspension point (i.e. ``co_yield`` or ``co_await``),
```

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


More information about the cfe-commits mailing list