You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gcovr does not understand your code, it just reports coverage results. So if your compiler with the optimizations you have chosen emits an extra fall-through branch because it cannot recognize that one of the cases must apply, that's an issue with the compiler and not with gcovr.
Note that gcc/gcov thinks about coverage in terms of machine code instructions, not in terms of language-level control flow constructs. The coverage results tend to get confused with inlined functions, optimizations, and C++ destructors.
With the following code I expect to get 100% branch coverage:
But it claims that I missed one branch.
Changing
case 0:
todefault:
gives the expected results.The text was updated successfully, but these errors were encountered: