<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/63280>63280</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Enhancement for clang-tidy bugprone-signed-char-misuse check
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
nunema
</td>
</tr>
</table>
<pre>
bugprone-signed-char-misuse check is currently limited to assignments and variable declarations where a signed char is assigned to an integer variable.
The header <ctype.h> declares character-handling functions (isdigit, isspace, toupper, etc.) that operate on an int argument.
In all the cases the argument value should be representable as an unsigned char or should equal to EOF. It is an undefined behavior If the argument has any other value.
It would be very helpful if bugprone-signed-char-misuse check reported the above-mentioned cases as well.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMk82SmzoQhZ9GbLqgsLAxXrCYOzOumtXd3BdoSQ3SjSwR_djlt09J9iSTVbKBruJwzukPgTGa1RHN7PAPO7w1mJP2YXbZ0QUb4dV9BpHXLXhHbZWqVmoM7cXEHAmkJvkNTASZQyCX7B2suZhECpKHh_uFXIqATsEVg0FhCRRJiwGT8S7CTVMgQHjYQ7Evjs9qDyMHxiVaKfz06ID1b6x_eVz_0wSaUFEANrzKdN-o02x4fyZRrLYoE4VWo1PWuBWW7OSjAuOTicqsJjH-CibGDSWVMfm8bRTKSEl2jJ8gaUzgNwqYCLx7dgMMay6bdo9CHw7QWkiaQGKkWKdPDVzRZoKofbYKBEGgLVAklyodLLQgu69AfPiU0_eMtkB5__fcwUeqrIpc0WKKXpDGq_EBPpbfU3U1voNPuoK0mbqvEIvZ7bPSlcIdNNltyRbM8henINDmQ_3yJVT4K7Ul1vi6RIWAEW5k7TO1UfOgTsMJG5p34zSO_DTwU6Nn3uPUn3bjcDzy3Z4flt0RezWJUcndJHDXmJn3fOjH3dDv-2l_6sQwLWI4jgcpxv1wXNi-pwsa21l7vXQ-rI2JMdM8DnzqG4uCbKxnnnNHN6gPGeflFwhzeacVeY1s31sTU_zlkkyyNL87jU5Shbr4ANKiW9tk1P3PmJoc7KxT2iIbXhg_M35eTdJZdNJfGD-XqOet3YL_n2Ri_FwLRsbPdYEfAQAA__8JpEWj">