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

    <tr>
        <th>Summary</th>
        <td>
            clang-tidy modernize-use-std-format breaks enums when used with '%x', and fails replacements when signed stdint types are used.
        </td>
    </tr>

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

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

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

<pre>
    These examples illustrate the two problems

```
int8_t int_8_value;
printf("%d", int_8_value) ;
```

Will fail to replace correctly. The int8_t will cause this error message, and the replacement will be skipped.
```
Unknown corresponding signed type for non-BuiltinType 'int8_t'
```

```
SomeEnum enum_value;
printf("%x %d", enum_value) ;
```

This example will proceed with the replacement, but will fail to add the necessary cast to the enum's underlying type, and so the format string will break your build. 

</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx8k8-OozgQxp_GXEpBjoGQHDgk3ZsX2Kz22DK4ErxtbOSyk2affmSg1ZkezUiWSnG--vP9ykgifbOIDatOrHrNZAy9882rvOPJSxucfbm8XLLWqam59EgI-CGH0SCBNiZS8DIghB4hPByM3rUGB2L8mM6Or4cftQ37twDahrf9212aiKw4MX4cvbbhysSeCcFEpebw8pNOHGDRPtdj_PivNgauUhsIDjyORnYInfMeu2CmHC49wtr2kaSdjJRG1QTovfMwIJG8YeonrZpNrGUGtGtSi0DvehxR5d8m-Me-W_ewS0canVXa3mCmqSBMI8LVebDObk5Rm6DtJd0xUS8zMVH_aun5599uwL9sHABtHP6A7AOeuD1pf4ftMgNYlrh4HL3rEBU8dOi_U0hF27jC-IQt1ULLYpcQ-gk6SSH9k27TDEzUBNEq9GZKWBKPT860yK7ODzIABZ8EC2yP8h0mFz20URuVA-PHTDWFOhQHmWGzraui2O62-yLrG95WUoiq3cqibFWNvOS7uuClwt2Oi_0u043gouK1KDnf7kSR865WvDrU8lAW12u9ZyXHQWqTG3MfcudvmSaK2GwrXpRFZmSLhuYvQ4jOSHvbBK2mhLp6zXyTsjZtvBErudEU6KtO0MFg85UDg1Porf4fN5FwQ0FtVv-zZ5qhETx6tBDpcxfpjYjqYw4Lu7QBet7PmrM-OwpK2zDTJpAe51p5Fr1p-hBGYsWRiTMT55sOfWzzzg1MnNPUa9iM3v2HXWDiPKMgJs4rjXsjfgQAAP__p7Ba6A">