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

    <tr>
        <th>Summary</th>
        <td>
            [llvm-cov][MC/DC][Qualification] Boolean Terms with == are not analyzed correctly for MCDC coverage
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          escherle-validas
      </td>
    </tr>
</table>

<pre>
    # Boolean Terms with == are not analyzed correctly for MCDC coverage
## Criticality: HIGH
During qualification of MCDC coverage at Validas we found that
In the following example the term “(v0==v1) && v2” is not analyzed correctly.
the equals operator "==" takes two boolean inputs and produces a boolean output.
Therefore it has to be instrumented as well such that the impact from v0 to the result can be analyzed.
This results in a wrongly calculated MCDC coverage measured by LLVMCov.
Note: In plain C there is no native boolean type defined, therefore instrumentation is restricted to && and ||,
but for C++ and Rust the boolean type exists and therefore operators on it should be considered for MCDC coverage. 
The problem occurs within Rust and C++.

Rust example:
![EQ_one_atom_rust](https://github.com/user-attachments/assets/e4ab4981-65bb-4db4-8309-cab56fa6241a)
Source Code and generated Reports:
[Test_000007.zip](https://github.com/user-attachments/files/17128975/Test_000007.zip)

C++ example:
![EQ_one_atom_cpp](https://github.com/user-attachments/assets/95fd44d0-4fe2-415d-90f1-88ea54d54316)
Source Code and generated Reports:
[Test_000007.zip](https://github.com/user-attachments/files/17129027/Test_000007.zip)



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