<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/72793>72793</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-tidy] misc-coroutine-hostile-raii does not detect hostile suspensions inside assignments
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-tidy
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
usx95
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
usx95
</td>
</tr>
</table>
<pre>
```cpp
Gen<int> Foo() {
{
absl::Mutex mtx;
int x = co_await foo_coro(1); // no warning here.
}
{
absl::Mutex mtx;
auto x = foo_coro(co_await foo_coro(1)); // no warning here.
}
}
```
https://godbolt.org/z/4hscdaMTz
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycUs2O2zwMfBr6QjiwJP_EBx82Xz73tLfeF7LN2CpkKTDpbnafvnCSNkGBAkUBAaJEcGY4GMvsxkDUQHEArVe-1AVoDcUxsatMcWmuX0kXh48Gyux2-vMZsiNkL18ogPnPBQHzP7Yxgt6DrhGqw62PzyWi7diDeQHz8roKXXCWC5invguCFwRzxD6-2XfrBE8xvvVx2ZAV6BrMAUG3oFsMEd_tElwYcaKFdg_G4z-R21Xinf2J9I9C_kbLLymP4qeFt-ckcuZN1BVmjEMXveziMoJuP0G3-cT9YF-_fiZDY4ba1DahRlVZZuraqDyZGq3qrsvyqihKGopTuc913le1UtmpVKqrEtfoTBulVK1Mtjf57lRQZalQpiyHExV7yDOarfM777_PG3fimFdqKl3VJvG2I8_3ePTehjEVN3zcM7I021DarSNDnnnHwg8YceKvwXoaK444O-7TzclVXKB0iizOU7pY53CIxBii4EBCveC9ibzymQK7GBhdYDcQ3pI7UxBO1sU3v1npZFq7XR9n0O2m6H6l5yV-o15At9ctGXR7XfRHAAAA__8aHOd6">