2 Commits

Author SHA1 Message Date
David Tellenbach
79709498ea
[clang][CodeCoverage] Fix conditional-operator test (#82192) 2024-02-18 15:11:08 -08:00
David Tellenbach
dc94eb57e3
[clang][CodeCoverage] Fix CoverageMapping for binary conditionals ops (#82141)
Fix an issue that produces a wrong coverage mapping when using binary
conditional operators as show in the example below.

Before this patch:

    1|      1|int binary_cond(int x) {
    2|      1|  x = x ?: 4;
    3|      1|  int y = 0;
    4|      0|  return x;       <-- Not covered
    5|      1|}

After this patch:

    1|      1|int binary_cond(int x) {
    2|      1|  x = x ?: 4;
    3|      1|  int y = 0;
    4|      1|  return x;       <-- Covered
    5|      1|}
2024-02-18 14:34:35 -08:00