<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/56201>56201</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [clang-format] clang-format 14 doesn't allow single line functions after #if in struct
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          baldurk
      </td>
    </tr>
</table>

<pre>
    Given this source file:

```cpp
struct Test
{
#if 0
#endif

  bool Blah()
  {
    return true;
  }
};
```

And running `clang-format -style="{AllowShortFunctionsOnASingleLine: Inline}" test.cpp` I get the output I expect with clang-format 13.0.1, with the `Blah` function moved onto a single line:

```cpp
struct Test {
#if 0
#endif

  bool Blah() { return true; }
};
```

However if I run this with clang-format 14.0.5 it doesn't forces the the function onto a new line. Running it on the output from clang-format 13 or on the original source I get:

```cpp
struct Test {
#if 0
#endif

  bool Blah() {
    return true;
  }
};
```

If I move the pre-processor `#if` outside of the struct definition, the output is the same on both versions (with a single-line function as I'd expect).
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy9lNuOmzAQhp8GbkZBxiGwueAiabRtpEqVun0BAwNx69jINkn37TsGwqZRL1q1akQ4-DT_fP_YlWley_fyghr8STpwZrA1QisVRutdxA4Ru91zNl11308tztuh9vAFnZ-HFPv5ha9lC2z5QN3I9n4xgMoYBXslThF_ivj21rwsAfSz6AdLwuxAYvZvQw63cIeleVF3H2WnG7CD1lJ3EIQrobtVa-xZeFg5_xpyPEScU9CdUub6cjLWPw-69tJo90nvXmimwo9SBxhw1Cq8FWEKeMo6CShyBkfo0BM_BDP4fvDUgN97JDZX6U_wU9x0nbAkjfi7qS9MoiVGELRSOweHs7lgA0Z7AwLcKAPUpOO3TYG_8CPMfeD_B-A_mCte0AIFPQYHptr6BYyMYGxAemgMOh3xwgN11ehGMOG_EJlZaLyOIBL4PDtLs42-p99ac36EDsYuo6zspBbqVuuje_-T678r8GPgG0plTKy3uOqtIXqOsg1Dg7xQVgTGyYZSb8eBcy4NtlLLADeU4x1AOeF34owBWmXIN7LThV0BlMdo5K0sV8GNN5uEgyP52Mw7gFJO4qZcN9v1VsReeoVltNnfuxNtDo9VcVcOImzM-x2whHIgWk9FNpkg9ZxWPFhVnrzvXfCUP9PVkd6hSmpzpg-lLrdHoPV1FPksnRvQ0csm5yyNT2WD6ZY_paKoOVb4xEVWMcbyNq3aIm2KIlaiQuVCMnQchKoclwinyeYQy5IzzlnOszRj2SZPeIZFtc3XnNV0q0WUMTwLqZKgIzG2i205SqqGzlGnks67t07hnOw0juzC-mLwdFaVlVDNYL_FY-hylP4D16HCyQ">