Skip to content

llvm-cov: Allow excluding functions from show and report #169444

@rkjnsn

Description

@rkjnsn

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.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions