Skip to content

Conversation

richkadel
Copy link
Contributor

Functions (including generics and including async function bodies (which
mimic closures with generics/type parameters) that aren't invoked are
not appearing in coverage reports. They don't get a zero (0) execution
count. They get nothing, and they don't appear in reports as "not
covered" code to be addressed.

I attempted to inject "Zero" counters for each of these, but llvm-cov
fails if the coverage map has a counter for a function that is non
defined.

@tmandry

Functions (including generics and including async function bodies (which
mimic closures with generics/type parameters) that aren't invoked are
not appearing in coverage reports. They don't get a zero (0) execution
count. They get nothing, and they don't appear in reports as "not
covered" code to be addressed.

I attempted to inject "Zero" counters for each of these, but `llvm-cov`
fails if the coverage map has a counter for a function that is non
defined.
@rust-highfive
Copy link
Contributor

r? @petrochenkov

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 24, 2020
@richkadel
Copy link
Contributor Author

@tmandry @wesleywiser

FYI, this doesn't solve the problem of adding coverage for MIR that was not promoted to a MonoItem, but I wanted to keep the code (in a separate PR) in case I want to build from it later.

Or it may never get used, which is fine.

Until we know more, I'm just saving a shapshot.

@richkadel
Copy link
Contributor Author

r? @tmandry

@richkadel
Copy link
Contributor Author

BTW, some test samples were added and/or modified, but the blessed "expected" files were not regenerated, so the PR will fail to build as it currently exists.

@richkadel
Copy link
Contributor Author

The lessons learned from this PR were successfully incorporated into PR #79109.

@richkadel richkadel closed this Nov 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants