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

    <tr>
        <th>Summary</th>
        <td>
            [clang static analyzer] `clang_analyzer_eval` affects the analyzer's result
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          0-0x41
      </td>
    </tr>
</table>

<pre>
    version: clang(trunk)
parameters: `--analyze -Xclang -analyzer-stats -Xclang -analyzer-checker=core,debug.ExprInspection`
case:

```c
void clang_analyzer_eval();

void f(int b)
{
    int c = 1;
 clang_analyzer_eval(c && (c = 0) | b);
    if (c && (c = 0) | b)
 {
        clang_analyzer_eval(c && (c = 0) | b);
        if (c && (c = 0) | b)
        {
            *(int *)0;
        }
 }
}

```


In this case, when `clang_analyzer_eval` is added at line 6 (https://godbolt.org/z/7o9647f17), the eval statement inside the if branch has no output. However, when line 6 is commented out (https://godbolt.org/z/szb8v58b9), then it is output. 

Also, the eval result of `(c && (c = 0) | b)` (line 9) should probably be TRUE after analyzer goes inside the if branch.

This case is a bit like issue https://github.com/llvm/llvm-project/issues/60118, except that the eval result on line 9 is known to be FALSE, and analyzer does not analyze the code in the second if branch.

Thank you for taking the time to review this case.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykVUtv4zYQ_jXUZWCDoqzXQQdvFKML9NRugd4WJDWyWNOkQVLO49cXpGwnabJFFisECjmcxzffNzK592pvEDtSfiFln_E5TNZ1dEUfN3km7PDUndF5ZQ0ptiA1N3vCmuBmcyCsJbQndHvijh8xoPPRh1R0teKG66dnhNXfKQSuBrfygQf_gV1OKA_oSNFL65CwuwHFvF_fP57cV-NPKEPEUNGlpOQeSbFdNpd3RZc_uezPVg0L4O_XIt_xzDVhTURefHkdnJxHwhplAohbZ6S-eAEAxCMJpOghv0X_oIAEwirCKljWRQ-UsBZIfbckL16nHeETEYv7Gzzx-fXyPwvh8rxDkoxse6EwrVr6rhKp-1sr_ZXj_kMZ3xjT-6uBMCkPSXx2Bw8TmjhuH5FQUVAe-DDgADyAVgYhdTaFcIpzStiOsN3eDsLqsLZuT9jumbBdbdtqU495HVtmdxAmhJgR4uDiEU0AZbwaMJ2oEYTjRk4wcQ_Ggp3DaQ5r-M0-4BndDeYFQERvjzELDtH3M4j8s2jOZSPaF0QGVIi5rtVes7TV3r4B7tDPOoAdI1ef0Lmi8SQBjiXBT3bWA5ycFVzoJxAI3_746x74GNDBlXbYW_QfUrN-je7bVcAkDwgVtTnEnZ8R_kOFCtMs1tIeCdtpfb7-W52c_QdlIGyXwjxhu4rmeRPbxkeJpwBh4uE9BRcd2lj8YOyDgWBjP7vt73_ex2huhpeOhtiRseFqSfmkHRCUSWuP0prhh51yc4AnO8NoHQR-UGafooI6Yqzr8Kzw4WWk19nQFUNbtDzDLq_qDS2qsmiyqSvLDaV5w_lYyaIZ8wJps8nrtizKRjY1ZqpjlBWRgpzSpmzWJRZlno85FYJKwSnZUDxypdeRvzhbWWKuq2jOaKa5QO3TFcCYwYdFDcJYvBFclzgX896TDdXKB_-SJaig092x_JzHb0TJG4Ok7P_n--TjiDL4xMktgtX-olY2O9390kAw-m8AAAD___nmC-0">