<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/85757>85757</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-tidy] bugprone-fold-init-type check doesn't detect type mismatch when functor is provided
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-tidy
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
atom00
</td>
</tr>
</table>
<pre>
When running bugprone-fold-init-type check on the following code clang-tidy doesn't warn about possible precision loss:
```
auto a = {65536LL, 65536LL, 65536LL};
return std::accumulate(std::begin(a), std::end(a), 1, std::multiplies<>());
```
Removing std::multiplies makes the check work correctly.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEkk1v4ywQxz8NvowSYQixffChbZ6cenoue8YwttlisGBolG-_slul3dVKK1lmmJc_zPDTObspIPZMPTN1qXShOaZeU1w4r4Zo7_2PGQOkEoILEwxlWlMMeBijtwcXHB3oviKYGc0bxAA0I4zR-3jb0k20CMbrMB3I2TvYiDkw0RDcdAqgh1gI1pizGzzCmtC47GIAH3Nm8onxC-NP7Mw_v32rC0XQwOQFWPN8VkqeX1-ZeIFv5sNuLkw-f9QlpJICZLKbsnzSxpSleE3IRPvwDji5wESrmeg2pUcAg_3mrn-LLcWTW73DzOQLk_8x0e553ePwP3r4-P-PS3zfxvQXIVj0G-Z9nB-zvcX0BiamhIb8_VjZXtpOdrrCvm5q3p5qXvNq7sW5PqPVYhw7lHq0w2Ab06oOT63kyrSV6wUXJy7rjnfyrPhxVKPhbXOyStTajiM7cVy080fv35djTFPlci7Yt6pRTeX1gD7vvAjx9bRMiI2f1G9Fh6FMmZ24d5nylww58jtp38rU5R9MfSFjkdAQ7LHF5UWTmeG20TmWYCgmcBnWFN-dRVuV5PuZaN05ElcmrpOjuQxHExcmrtulPpfDmuJPNMTEdW80M3Hde_0VAAD__933-yg">