-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Closed
Labels
clang:codegenIR generation bugs: mangling, exceptions, etc.IR generation bugs: mangling, exceptions, etc.clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"coverage
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|}
Metadata
Metadata
Assignees
Labels
clang:codegenIR generation bugs: mangling, exceptions, etc.IR generation bugs: mangling, exceptions, etc.clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"coverage