<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/162941>162941</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
`-Wenum-enum-conversion` missing for compound assignments
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang:diagnostics
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ahatanak
</td>
</tr>
</table>
<pre>
```
enum E1 { A };
enum E2 { B };
void test(enum E1 e1, enum E2 e2) {
e1 = e1 | e2; // warning: bitwise operation between different enumeration types
e1 |= e2; // no warning
}
```
clang should emit warning `-Wenum-enum-conversion` for the compound assignment too since it also performs a bitwise operation between `E1` and `E2`.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx8UtFuszwMfRpzY7VKnALlIhd0XV_hvw5gIP8HSZWETnv7T2HrtotPk5AtbJ1jnxObGO3kmDWUFyivhdnS7IM2s0nGmT9F54d3DZX4_ETLblvxVSLUF2wR6iuoy1eZ9vLluwyifXg7YOKYgM5PMEugF3ximICajATRIrJEUNc91S-5py4IdAO64ZsJzroJVIudTW82Mvo7B5Osd9hxemN2ONhx5MAu7fzPbnq_c_zir1_2ET-5nX_SY967vub4QzeItl-MmzDOflsG5NWmb0QlDv_lcYc99N49OETrHVQCRx8wzYy9X-9-cwN-eL7mFZP3GK3rGW1Cs0SPdw6jD2tE84tGqMSrzNzGDfsPQSWOxaDV0KjGFKxlXQmpzqVUxawN1b041VyKMzcjn89jrfqq7A2LRjGbwmoSVEohBSmSpTrK8myaspNKDSTlSHASvBq7HJflsR59mAob48ZaVtScZLGYjpe43xDRbhOodrBmcj4m20cgyscVdIYfum2KcBKLjSl-EyabFta_OrnaGLPd2dF_uBmLLSx6TukeQbUf7zrZNG_dsfcr0C3P-kyHe_D_c5-AbruSCHT7FPPQ9DcAAP__CPH19w">