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

    <tr>
        <th>Summary</th>
        <td>
            `clang-format` oscillates formatting of `// clang-format off`
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          Svetlitski-FB
      </td>
    </tr>
</table>

<pre>
    `clang-format` oscillates between two different choices for how to format the following minimal example. It will continuously reformat it's own output. Here is the relevant `.clang-format`:
```yaml
---
Language: Cpp
BasedOnStyle:  Google
ReflowComments: false
```

And here is a minimal example in C++ to reproduce this.

```cpp
void func() {
  // clang-format off
  #define KV(value) #value, value
  // clang-format on
}
```

Running `clang-format` against this produces the result:
```cpp
void func() {
// clang-format off
 #define KV(value) #value, value
  // clang-format on
}
```

But running `clang-format` again on that output re-formats it back to the original code (i.e. it adds the indentation back before the comment). I have tested this against `clang-format` 16.0.1 and 12.0.0, and am able to reproduce the bug with both.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8VE2P2zYQ_TXUZWBBomzZPuiw3oXboAUKJEDvI2oosaFIgxza3X9fUPI2gZvu3gIY1pDzwffeDIkxmtERdWJ3EruXAhNPPnRfrsTWcPxqNudT0fvhtRNtpSy6caN9mJFFW4GPyliLTBF64huRA755GIzWFMgxqMkbRRG0DzD5G7CHNRt4ItDeWn8zboTZODOjBfob54ulEj4x3Iy1oLxj45JP0b5CoHuyYSH3EfzNgU98SVzCrxQITFzqBrJ0Rccg2qp8wCyaJ1G9iOop28vvFWe7bm02m9X4Hd2YcCTRPMHz5bJunjDS8If7wq92ccAv3o-WVudn0tbfnv08k-OY3RptpIej7svl_8kNMN1B46MAYBw8C3kS8pQ1C3QJfkiKgCcTy-_L_FtbveG8ejOATk4JeRDyCGJ_Wh0AQp6FPMP3koDX-pu7GUgbR_Dbn0IermgTLRVkc7efYTXeq-fuwPYv77D_nJzLjf_BUOGIxkVeqMKd91tfY7L83w5-TP194j-R9ykxhA-4g3fAUy65zDYEukdEMAw9qq95JrIgPpjROMzXZCAQ8mBKKnMQDsMqmXEDOUY23q2Zfb5DtPjUOq1CHkv4BBNeCZgi07BK_9aHH8Cs27Iqa0A3QC3LqqyyQnmFM2Bv6XFmCfo0ws3wBL3nqSyGrhmOzREL6ur2UDfN9nioiqmjHZGW7Q53rap3_fawb6jd1q1WqEkd68J0spJNta2lrOVxW5X7uj1KRFW3Ssvdbiu2Fc1obGntdS59GAsTY6KulXW1Lyz2ZOPbWxe6HLTp0xjFtrImcvyWxoYtffDorZucm-l1Fur_5qytihRsNzFf8uOwho2Gp9SXys9CnvO598_mEvxfpFjI84I9Cnle4P8TAAD__6ThxLU">