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

    <tr>
        <th>Summary</th>
        <td>
            [clang-tidy] spurious `warning: #includes are not sorted properly [llvm-include-order]` and `warning: no header providing "std::streampos" is directly included`
        </td>
    </tr>

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

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

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

<pre>
    https://www.google.com/search?q=%22no+header+providing+std%3A%3Astreampos+is+directly+included%22 returns "No results found".
**Steps to reproduce**:
_Assistant_ says to include `ios` or `iostream`, but https://github.com/SwuduSusuwu/SubStack/blob/912d2b25d6b77bc77aed59d95f2732cc63834e76/cxx/ClassIo.hxx#L5-L14 has
```
#include "Macros.hxx" /* SUSUWU_IF_CPLUSPLUS SUSUWU_NOEXCEPT SUSUWU_SH_DEFAULT SUSUWU_SH_ERROR SUSUWU_SH_GREEN SUSUWU_SH_RED SUSUWU_UNIT_TESTS */ #include <iomanip> /* std::setw */ #include <ios> /* std::hex */ #include <iostream> /* std::cin */ #include <istream> /* std::basic_istream */ #include <sstream> /* std::stringstream */ #include <stdexcept> /* std::runtime_error */ #include SUSUWU_IF_CPLUSPLUS(<cstdio>, <stdio.h>) /* FILE */ #include <string> /* std::string std::to_string */ #include <type_traits> /* std::enable_if */
```
.
```
~/SubStack $ clang-tidy cxx/ClassIo.hxx
```
**Actual result:**
```
76410 warnings generated.
/data/data/com.termux/files/home/SubStack/cxx/ClassIo.hxx:6:1: warning: #includes are not sorted properly [llvm-include-order]
    6 | #include <iomanip> /* std::setw */
      | ^
/data/data/com.termux/files/home/SubStack/cxx/ClassIo.hxx:120:13: warning: no header providing "std::streampos" is directly included [misc-include-cleaner]
    3 |         const std::streampos pos = is.tellg();
      | ^
/data/data/com.termux/files/home/SubStack/cxx/ClassIo.hxx:179:15: warning: narrowing conversion from 'streamoff' (aka 'long long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions]
 179 |                 for(int i = ((newPos - pos) >> 1) - (SUSUWU_HEX_DOES_PREFIX ? 1 : 0); i--; ) {
      | ^
```

**Expected result:**
```
76408 warnings generated.
/data/data/com.termux/files/home/SubStack/cxx/ClassIo.hxx:179:15: warning: narrowing conversion from 'streamoff' (aka 'long long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions]
 179 |                 for(int i = ((newPos - pos) >> 1) - (SUSUWU_HEX_DOES_PREFIX ? 1 : 0); i--; ) {
      | ^
```

</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzsVs1u4zYQfhr6MrBBkZZkHXzwj9QNkGaDOEFzMyiSltmVSZWk4uTSZy8oy4mT2Fug3RY91JApDTEzHH7D-YbMOVVpKaconqN4OWCt3xo7Xe1b0a5a1-7bQWnEy3TrfeMQnSFSIFLs9_tRZUxVyxE3O0QKJ5nlW0SL3xBdIhITog0i861kQlpE5o01T0ooXSEyd14gEgdXMZ05byXbNcYhMldhEMpK7uuXIGtet0KKzh9Y6VurHSBCbgxY6draO9iYVgtEyAjhGSLhWXnZOPBBpbFGtFwe5kPweLaeOaecZ9qvwbGXTrFfB1CClXEowWBsL3TRoQQjsoCy9fAehkr5bVv2EJxAFqS2XHnGvyFSlLUpESmyiAhSklgkZZqWPE2ZFHEmsnhDUko4T-iEjmWaIFLw52dEikXNnLsyo22Q6HU8vI7GsGUu7DTB_RN2TV83QMjPjFvjDjYEujBnsHpYPfzysL4q1ovb64dV-B_nbr7mj4v89v4or76sl3kxe7g-ncnv7r7encg_3eX5zYl8ly-P0sPN1f36Pl_dr6CDvYDT-OhCmR3TqkE0PwYXjgMN2XHS7y8ZuXMGW_l8Uf-QuDNGXOkLRpdtSuYUX_cK563dZWvnrdLVd429kM9cNv6cuW21Vzu5ltaGY_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