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

    <tr>
        <th>Summary</th>
        <td>
            `clang-format` behaves differently on pipe than with explicit path
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-format
      </td>
    </tr>

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

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

<pre>
    Previous discussions: https://github.com/clangd/clangd/issues/1926, https://github.com/helix-editor/helix/discussions/9563

**To reproduce:**
```bash
$ touch .clang-format
$ printf '#include "a.hpp"\n#include "b.hpp"\n' > b.cpp
$ clang-format --style=file b.cpp
#include "b.hpp"
#include "a.hpp"
$ cat b.cpp | clang-format --style=file
#include "a.hpp"
#include "b.hpp"
```

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMU82OozwQfBpzsUCmIfwcOMw3-TjvYV_AP03slcGWbWaHt19BJkqyGkUrtcBWuaoausxjNJcFcSCn_8jpnPE1aRcGnI3dtm2zZsZMOLUNPwJ-GLdGqkyUa4zGLZFUb1Sn5PcFgZHAeDFJr6KQbiYwSsuXi3pcmBhXjATGsoeGwPsrtkZrPnNUJrlw2xIYH-1h7E9NRdiZsLevJ-z109GAPji1SjzEj7oeaNi1BI_6xqlpcqvUtDgazScXZp7uoA9mSRMl0BKozCLtqpASAF5o7wkAOb0vz4h4QlpKqv-pKKT3d9FHK5rnMW0WSXWejMXno9_qfoPxv7CaSp6uUpS0768M_0XuRRu3X3rdZmqoVF_1PMOhbFlbdW1bt5keTj2IRqmpxUrU2Pa96qu6E1x0jE2VZJkZgEHNgHUlA4C26LjsBEOQiikopSA1w5kbW1j7MRcuXLIjUENXlmWXWS7QxiPIAE-T3AdxzsKw03KxXiKpmTUxxbtQMsniQBr2RGwYFaj5B-6xnyYMuCS7UbdQbzzSpPlCf5ukKX56a6RJ1POkszXY4UWyd9OvV-6D-4UyPd6N42v-BAAA__85kBmw">