Closed
Description
When a if constexpr
has a block {}
and the condition is false, the source-based code coverage always marks the opening {
as not-executed region (see line 4).
Tested with clang 14.
1| |template <int C>
2| 1|int test() {
3| 1| if constexpr (C == 0)
------------------
| Branch (3:19): [Folded - Ignored]
------------------
4| 0| {
5| 1| return 1;
6| 1| }
7| 1| return 0;
8| 1|}
9| |
10| |int main()
11| 1|{
12| 1| return test<1>();
13| 1|}