llvm-cov: Allow excluding functions from show and report
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
I have some test functions I would like to exclude from the stats summary, html, and exported lcov data. However, I only see options to _include_ specific functions / function patterns, not exclude. Additionally, `report` and `export` don't seem to honor `--name-regex=` despite it appearing in their `--help` output, and using `--name-regex=` with `show` changes the output to display individual functions rather than source files, whereas I would like to exclude specific functions while still keeping the output in source-file mode.
`llvm-profdata` has both `--function=` and `--no-function=`, and it would be nice if `llvm-cov` had similar. (Passing `--no-function=` to `llvm-profdata` doesn't help in this case, as that causes the functions to be shown as uncovered by `llvm-cov` rather than be omitted from coverage analysis entirely.)
Contributor guide
Research direction
Start with the llvm-cov show, report, and export entry points and compare their --help output and current --name-regex behavior. Review llvm-profdata's --function and --no-function options for the intended filtering distinction. Done means functions can be excluded from coverage analysis across summary, HTML, and lcov output while show remains in source-file mode.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100