<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=http://email.email.llvm.org/c/eJylVU1v4zYQ_TXyZWDDluI4OviQ2Am6QNEFdi97KyhqZLGhSIGk7E1_fR8pKfZig22BGvKHNMOZeW_mjStbv-0fybFkE0i2wpyYlCGh-1aspHW8OlhzZueVNdQKD2Nwth4k19QI7Zl661VQZ6aLcEaZk6fGOhLkRcMkTE3Sdh0Oq1rZbkX0SF51vWYk7cdILssPY8Y_5XuylYxPlSff2ouhirW9UJY_xIgXO-gaj0iEIGSLUlDYhbVORxr6hJzRo1GnwTHZIRCCULB04kAnFdqhindCSu4Das3yPObLcQKFIZgwU-wOvGR5mRWP2fqYrefP-_V0pVuqhG-z4pmkCJTtnrP85Wc4NPlmeaGM1EPNlBUHH0DLKh6ezeMXaKZOKAPEZ6tqlIDAT5ORaDBenQyADwhypM06K26McD3Exyhl_b1pbm2Ow-AM3fhnu-OPqd_BaEwDLZfCCP32N19_uaWxy5obMeiwBP3y1dPy22ykq1uyob3F8eN5-neqXnoR2g990JEt3g94z5MXf_5uvSfbUKQnDnIcNSUVZvsm7fbpw3qy7fE_cZhe2fY5lv9-jcbNXAsmzbATgevVhyMzfv7GjuPMhpZJq4ADOhbqg0D74Zsy36-TDMZ-V280MZ9EAzGoEEU5Yxul4THmMWZioVIBsntxtiNroFd49iyjZJNcEGjnMVA1niNvLSpIILRijDC1kDp1agPiRhOqiRLBtEP-4FrMxU3yNHwSY_iSzkIPwIYdAU5iqamkS8uxO2erzziGNtk-khUBpMwpwxQ06tRcBz4FBJ5D3FUx6C138J1YGyJtIkrHJ495RCJpnt7sMCHi75GL1W1TnrAu4goc8Wn1OmIeyaLasocqd1GesHg2cELemAA7A3ssbaGKpRiiBbmv4CKu2I-LgunzF8AAZV9FlzIASyv6HgHTBp3dHv84zq3uHfuhQ4PefvD49vkLqEawr4kiw5AAMinnWPM5jpKKvLK_KSXB-ZTSvk7oF_W-qMuiFAsxhNa6fRCDbJ3yi8HpfRtC7-MazF9wjTsUAupwo_V5_lpipf8FQnGrvB8YaV62xUO-W7T7u7Iqd7Uod_K-4vuHupC7zVbualk0ZV6ui4UW2PJ-D3lCiYv_n1Lt83WOa3O3eSg2m3xVimK3vZMl_pnu-J6b7G7NWLJ6FeOsrDst3D6FrIaTh1ErH_zVOI0kzxUGFTTvD5NCfrFV8JdzZv_L_0tjzVI4QOw4KHnTp0UCtU-I_gE-tYWI>53827</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Checker [alpha.core.Conversion] gives false positive warnings for non-arithmetic operations
        </td>
    </tr>

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

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

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

<pre>
    A recent change in alpha.core.Conversion has introduced false positive warnings for a safe and common idiom.  A simple reproducer, alpha_conversion.c, is shown below (and would be attached as well, if I could figure out how to get github to accept a ".c" file as an attachment):

```
 bash> cat ~/alpha_conversion.c 
 #include <stdio.h>
 
 int main(void) {
   unsigned u = 10;
   u |= ~0xff;
   return 0;
 }
 
 bash> clang --analyze --analyzer-no-default-checks -Xanalyzer -analyzer-checker=alpha.core.Conversion ~/alpha_conversion.c 
 /path/alpha_conversion.c:5:8: warning: Loss of sign in implicit conversion [alpha.core.Conversion]
   u |= ~0xff;
        ^~~~~
 1 warning generated.
```

Here, the literal constant `0xff` is signed by default, and its inversion would set the sign bit.  From one perspective, it's understandable that the checker might see this as a case of a signed (and negative) value losing its sign when involved in operation that is assigned to an unsigned value.  Changing the literal to `0xffu` avoids the warning, as you might expect.

But in a case like this, it doesn't make sense to warn at all, because the operation is a bitwise OR.  (Same thing happens for bitwise AND, and presumably for bitwise XOR).  Signedness is irrelevant in these operations, I think.

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyNVcFu2zgQ_Rr5MrBhS3FsH3xI7BhbYLEF2ktvC4oa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