<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/80981>80981</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Inconsistent indentation
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
HFriberg
</td>
</tr>
</table>
<pre>
When I format
```c
#ifdef __cplusplus
extern "C"
{
#endif
#if 0
typedef int myint;
typedef double mydouble;
#endif
#if 1
#else
typedef int myint2;
typedef double mydouble2;
#endif
typedef int myint3;
typedef double mydouble3;
#ifdef __cplusplus
} /* extern "C" */
#endif
```
I get
```c
#ifdef __cplusplus
extern "C"
{
#endif
#if 0
typedef int myint;
typedef double mydouble;
#endif
#if 1
#else
typedef int myint2;
typedef double mydouble2;
#endif
typedef int myint3;
typedef double mydouble3;
#ifdef __cplusplus
} /* extern "C" */
#endif
```
1) Why is formatting inactive in the `#if 0` block, but active in the `#if 1 ... #else` block?
2) Why is the indentation of `myint2` and `mydouble2` inconsistent with the indentation of `myint3` and `mydouble3`?
---
My `.clang-format` style is
```
BasedOnStyle: LLVM
BreakBeforeBraces: Allman
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzkVE9vnD4Q_TTmMlpk7F28HDjsJkK_SIl-h0rNMTJ4ADfGrGyTlm9fOctmt2n-SD1VqgSC8bx5M7yHLb3XnUUsyWZPNteJnEI_uvK_yukaXZfUo5rL-x4t3EA7ukEGQq8J3ZGcHq9miRnXrcIWHh6ag5l8vI8Z_BHQWSCMXRHGFrTYv5ShVbpdojMV0GMQ5gNGWm0DDLO2gfClFOCUU-NUG4RhPr68IN4nz84A4_GdTuzzVuzDXr8x8s8Zz5DPdCXiGgirCNvBrxIDYbuYeGuuk2uXLW6gw3_R1T_y9DzfX-5qRlgB9_0M2i8bN2jbgbayCfoJQVsIPUKsWpzJKdRmbB4Ju4J6CvAOMIM0TeEk8ksRry67s4vusVpbhTbIoEcLYxvJFjNyCtKq48JJ_5yCts1ovfYBbYDvOvQfsfA3WOLaq5lWq9VleDdHfNoYabvVcrTlFHyYDYL2b0q7lx7V__ZLxBC-g9vbr3dLxqF83GM7Otw72aCP6Z0xg7SvmBJVclXwQiZYZoIKTgXNRNKX2bouRMuVyptNhluOvMBCKYFFzumWiUSXjLI1ZVRk2SbfsLQRoti0XKJoC4UZJWuKg9QmNeZpSEfXJdr7CcstLbZZYmSNxp8OeldG0KqeOk_W1Ggf_Lks6GCwvLk04UL7ZHKm7EM4xI98_lmrTod-qtNmHAirIs3yWB3c-A2bQFj1PIonrHqe5mcAAAD__xqi4_c">