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

    <tr>
        <th>Summary</th>
        <td>
            [clang-format] "AllowShortFunctionsOnASingleLine: Inline" ignored when methods are inside "pragma region"
        </td>
    </tr>

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

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

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

<pre>
    When I upgraded clang-format to version 14, I noticed that with configuration `AllowShortFunctionsOnASingleLine` set to `Inline` many methods where actually formatted like it was set to `None`.

It seems that when a pragma directive is used, subsequent statements are treated as "out of class".

This was working correctly with clang-format 13. Is it expected?

### Examples

```yml
# .clang-format
Language: Cpp
BasedOnStyle: LLVM
AllowShortFunctionsOnASingleLine: InlineOnly
```

**standard**
```cpp
// test.h
class Ciao {
  void foo(float value) { int t = 0; }
};
```

**with pragma**

```cpp
// test.h
class Ciao {
#pragma region Sample Region
  void foo1(float value) {
    int t = 0;
  }
#pragma endregion
  void foo2(float value) {
    int t = 0;
  }
};
```

**with clang-format 13**

```cpp
// test.h
class Ciao {
#pragma region Sample Region
  void foo1(float value) { int t = 0; }
#pragma endregion
  void foo2(float value) { int t = 0; }
};
```

### Environment
```
clang-format --version
clang-format version 14.0.0 (https://github.com/ssciwr/clang-format-wheel 870fc1cea642c904d0b51a7f598d12d24e7ee476)
```

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzNVU1v2zwM_jXORYghy3YSH3xo2hUo0K3AOuw9yxZta5OlTJKT5d-PspM2CfLuq5cBQiJ-hHz4kGIqI_blfx1o8kCGTWu5AEFqxXU7b4ztuSfekC1YJ40mSRaxW3TUxssa_XyH9p30HamNbmQ7WO6DX7SgN0qZ3XNnrL8fdB207knfPEvdKniUGtCFOBij4_VBq4Ou53pPevCdEY7sOrBAeO0HrtSe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