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

    <tr>
        <th>Summary</th>
        <td>
            scanf format attribute type confusion with char/bool
        </td>
    </tr>

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

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

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

<pre>
    The scanf format attribute currently issues no diagnostics when confusing a `bool` value and a `char` specifier, though GCC does diagnose. Consider:
```
void foo(void) {
    bool b;
    scanf("%hhi", &b);
}
```
https://godbolt.org/z/jrcKzPb9r

Clang emits no diagnostic in this case, while GCC emits `format '%hhi' expects argument of type 'signed char *', but argument 2 has type '_Bool *'`

Perhaps Clang should diagnose similar to GCC?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0U89vszgQ_WuGy6iRMyT8OHBIUrGHvfSw95WxB-zK2JFt2m3_-hUkaT9V3ychY4b38Js3D5mSnTxzB8czHJ8LuWQTYneSMfizdG6WvhiC_uj-MYxJST_iGOIsM8qcox2WzKiWGNln94E2pYUT-oDaysmHlK1K-G7Yowp-XJL1E0qESgwhOKgEvkm3MEqvb2VlZFzL6crKjpYj0AWzCctk8K_LBXXg9Pg27_ASfLKaI5QnEM8gTlCJ-7U9vgWrcQwBqFm3QC1Cfb69Q0RcVeAA5S-lrUegBoiAjsbYbXNBoGoAar-wUD__9kiT8zWteqgH6qegh-DyLsQJqP8E6l-j-vvzZWjjnb2tFyf9hDzb_MM8tB6zsQmVTLzKeDfW8WbFDQ2VuM8DqH4IrpH_u7LKCWWclpl9xjBi_rjyitoGrnG1GoFOG--Cw5K_0YRGpi_Cv-fVpjv00edtfeFo5DXhrYFkwuL013ww2dk6GTGHVTGUfaG7UrdlKwvu9lVLbVXVpShMNzRlqY7HPSlxkHslDsy6qWsxilJWBx4K25GgUjR03FNJe7FrqqFsuNR0FHovRgkHwbO0bufc27z6XWxh7KpD29SFkwO79Ah57FbQ07BMCQ7C2ZTTNy3b7Lj7Q9Q3S-5RDh7fbTabkUD9mqViia77kQCbzTLsVJiB-vWQ--3pGsMrqwzU3_4aoH7T-n8AAAD__3OUHoA">