-
-
Notifications
You must be signed in to change notification settings - Fork 17.4k
Known limitations of branch coverage instrumentation #124118
Copy link
Copy link
Open
Labels
A-code-coverageArea: Source-based code coverage (-Cinstrument-coverage)Area: Source-based code coverage (-Cinstrument-coverage)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Activity
Metadata
Metadata
Assignees
Labels
A-code-coverageArea: Source-based code coverage (-Cinstrument-coverage)Area: Source-based code coverage (-Cinstrument-coverage)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Branch coverage is known to support these branching language constructs:
ifandwhileif letand let-chains||and&&as separate brancheswhiledesugars toifbefore MIR building, so we support it as a consequence of supportingif||and&&expressions||and&&are treated as separate brancheslet-elsestatementsifexpressions before MIR buildingif letguardsBranch coverage is known to not yet support these branching language constructs:
matchexpressions?operator (which conditionally returns)matchexpression, so once we support those, supporting?should mostly be a matter of expansion-span bookkeeping.awaitexpressions (which implicitly “return” when the enclosing future is dropped)?Relevant PR links:
(Rewritten on 2024-07-11; see edit history for the old text.)