Issue 109950
Summary [llvm-cov][MC/DC][Qualfifcation] Boolean Terms with != are not analyzed correctly for MCDC coverage
Labels new issue
Assignees
Reporter escherle-validas
    # 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 note 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:
![NEQ_one_atom_rust](https://github.com/user-attachments/assets/d14a0a2b-cb13-414c-9b59-1b7a45b97e6d)
Source Code and generated reports:
[Test_000008.zip](https://github.com/user-attachments/files/17129108/Test_000008.zip)


C++:
![NEQ_one_atom_cpp](https://github.com/user-attachments/assets/2272dec2-3378-4844-ab3e-43fa46827d8f)
Source Code and generated reports:
[Test_000008.zip](https://github.com/user-attachments/files/17129119/Test_000008.zip)


_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to