<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/57240>57240</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Wmisleading-indentation not firing
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
m-gupta
</td>
</tr>
</table>
<pre>
This was reported by an internal user.
This code has a misleading indent after if (foo == 0) condition but Wmisleading-indentation is not firing (https://godbolt.org/z/8GW5ET3cb)
```
#include <stdio.h>
#include <stdlib.h>
static void inc(volatile int *v)
{
*v++;
}
static int foobar(void)
{
volatile int foo = 0;
volatile int bar = 0;
foo = rand() % 10;
if (foo == 0) {
inc(&bar);
inc(&foo);
printf("foo %d bar %d\n", foo, bar);
}
return foo;
}
int main()
{
foobar();
return 0;
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx1U9FyqyAQ_Rp8YeIQUKMPPqRJ7_2BzvQZBJUOgQxgOr1ff1dMmjRNZlCBs3v2cFiFk1_t26gD_uQBe3V0PiqJxRfmFmsblbfc4CkonyOyR2SbYjsnFR4hgeODDkZxqe0A4VLZiHkPWRjrHiNa985hxPYwMEG0gUwrddTOYjFF_H7NXi3ZPGFQwrqIe-1nXqAZYzwGxLaI_oExOCmcibnzA6z-wVP_fS9f31gnoMai8_yuyHksS8q07cwE6hHbhSi1y0fEXp-gRotbOL3DLLHDJ6clHLgDbSdnYMuo2S7Quj1dNWxeLqnNArzMg112N_sHzDMLuCa4T9xaPqT7UfRsMjjMnkQA26-Ic9wl2XMLper5khAt8fpB6OMr_XFKCEqmIFqlEzS3kr4hoLiDjnDTsU8oTQVoKRfVMEHlzsI-ojucMnf4N_eNmY1XcfI2xT7xevbkwLVdDvzb3u8LuKtyZiYPeC-dlql2XVWkrpqGNZlsmYQvz6KORrXPGv7a7dnkTXvX7jqOk8g7d4CFMafLZ3X07kN1EZY6hEkFmJQbWpBsbDdFI3oiZV0WXcF7Tus1gxkVopZdTarMcKFMaFEJLUmt-sSJYna53Ge6pYRSUq8bQoqSNXlTSV7XneqZKtd1QVFBFPhn8lnH_B9mvk2SxDQEAI0OMVxBHoIerFKpHPDzKY7Ot4fVMB0jz1LpNkn_D9pvToM">