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

    <tr>
        <th>Summary</th>
        <td>
            unexpected warnings with builtin_dump_struct
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    ```
$ cat ~/tmp/t.c
int printf (const char *restrict, ...)
               __attribute__ ((__format__ (__printf__, 1, 2)));

typedef unsigned char u8;
typedef unsigned char u08;
typedef unsigned short u16;
typedef unsigned int u32;
typedef unsigned long long u64;

struct llu_dump_test {
 u64 a : 4;
  u64 b : 56;
  u64 c : 4;
};

int main() {
 struct llu_dump_test lludump;

  __builtin_dump_struct(&lludump, printf);
  return 0;
}

$ /home/bpang/mywork/llvm_github/llvm-project/build/bin/clang -c ~/tmp/t.c
/home/bpang/tmp/t.c:19:25: warning: format specifies type 'unsigned long long' but the argument has type 'int' [-Wformat]
   19 | __builtin_dump_struct(&lludump, printf);
      | ^
/home/bpang/tmp/t.c:19:3: note: in call to printing function with arguments '("%s%s %s : %zu = %llu\n", "  ", "u64", "a", 4U, (&lludump)->a)' while dumping struct
   19 | __builtin_dump_struct(&lludump, printf);
      | ^
/home/bpang/tmp/t.c:19:25: warning: format specifies type 'unsigned long long' but the argument has type 'int' [-Wformat]
   19 | __builtin_dump_struct(&lludump, printf);
      | ^
/home/bpang/tmp/t.c:19:3: note: in call to printing function with arguments '("%s%s %s : %zu = %llu\n", "  ", "u64", "c", 4U, (&lludump)->c)' while dumping struct
   19 | __builtin_dump_struct(&lludump, printf);
      |   ^
2 warnings generated.

```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsVk2PszYQ_jXmMloENgQ4cMgmL-deqh6RMQ64NQbZ46bbQ397ZWA3m-xuW6lS30sRMf54ZuaZDyZw59RgpKxJ_kzyc8Q9jrOtn_nsRm5-4GaIurl_qckh2e_kTJIjoRkIjvAHoQ1OSxhjsR0pg7BYZfAChJZiNg5BjNwCoUcrHVolkNATxHFMaLXJwP3VthzRqs6jbNughdCybS-znThuG227mWjboCoNAw3atps97yzXEV8W2csLeLO62m9sfPkG-wKQ_AXCjbNF8Onha0iIg2f0a4CezbAN_pA9cHZovUDQ2re9n5YWpUMgxY4JAsCBsCPcBGHd7dbd_PCwLR7ApDg_WAx0J67MGu3qna1PqWjtw-JBR8hc55VGZTbsJruqPLyK0NNeHu8zBWAlemsguaP4TneoOEKbcZ4koU23cDMQ2kwv19n-Qmij9a9TOygcfbevnhY7_yyD9SZw6sMzuNcIzc0AT-Kz4v1o4QZgx7Qi7EjzEMort0aZIUy3ugS3SKEuSjoImQZCi4-ZJrSAziPgKIHbwU_SIIz8JqIMBgzJn59-2vSS_Pz2jqQhL6d_EeRwBQ0k__aP_WXBRzOjDE9lQHCtAedNvzIDXLwRqGYDV4Xjm1suuLOSooTmLvxgG9gxTH73QNg5zLT2JD-ZFXgCQinAbR5ejbcF36fZj9vGncfVE2Hf-NoBCriOSksIB4HhHqHvGsb_y-a7lY3427IR_2nZwC2Q9LUiHAzSSMtR9vFd23v93436mvUVq3gk67RIWFJlKWPRWJcsYVlfsTSvWJbmZV91KS8uSdmLlHdlEqmaJpSllCZpkdGUxfJASyYzIQ5cdpxeSJbIiSsdh7YZz3aIlHNe1sUhKbNI805qt34fUGrkFdbDENL8HNl6bbWdHxzJEq0cupsWVKhl7Y38bZECZX_zdU35J2GMvNX1iLg4wkKREdpsPT0W87T39Y_tfSXkCG1Wwn8GAAD___-qnWQ">