Skip to content

[llvm-cov] let text mode divider honor --show-branch-summary --show-region-summary etc #96016

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 19, 2024

Conversation

whentojump
Copy link
Member

Otherwise it would be unnecessarily too long

Before

before

After

after

Copy link
Contributor

@hanickadot hanickadot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to fix tests for things you changed in llvm-cov.

@whentojump
Copy link
Member Author

whentojump commented Jun 19, 2024

Oh I just realized file reports and function reports are using two different *Columns arrays...

@hanickadot
Copy link
Contributor

I also wonder why missed functions is not colored. But it's not about your PR.

@whentojump
Copy link
Member Author

I also wonder why missed functions is not colored. But it's not about your PR.

Right now the three columns for functions and for instantiations are [not colored, not colored, colored]

For all others, [not colored, colored, colored]

OS << format("%*u", FileReportColumns[4],
(unsigned)File.FunctionCoverage.getNumFunctions());
OS << format("%*u", FileReportColumns[5],
(unsigned)(File.FunctionCoverage.getNumFunctions() -
File.FunctionCoverage.getExecuted()));
if (File.FunctionCoverage.getNumFunctions())
Options.colored_ostream(OS, FuncCoverageColor)
<< format("%*.2f", FileReportColumns[6] - 1,
File.FunctionCoverage.getPercentCovered())
<< '%';
else
OS << column("-", FileReportColumns[6], Column::RightAlignment);
if (Options.ShowInstantiationSummary) {
OS << format("%*u", FileReportColumns[7],
(unsigned)File.InstantiationCoverage.getNumFunctions());
OS << format("%*u", FileReportColumns[8],
(unsigned)(File.InstantiationCoverage.getNumFunctions() -
File.InstantiationCoverage.getExecuted()));
if (File.InstantiationCoverage.getNumFunctions())
Options.colored_ostream(OS, InstantiationCoverageColor)
<< format("%*.2f", FileReportColumns[9] - 1,
File.InstantiationCoverage.getPercentCovered())
<< '%';
else
OS << column("-", FileReportColumns[9], Column::RightAlignment);
}

Don't know why either... :)

Copy link
Contributor

@hanickadot hanickadot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@whentojump whentojump merged commit 61e62ce into llvm:main Jun 19, 2024
7 checks passed
@whentojump whentojump deleted the llvm-cov-divider branch June 19, 2024 20:42
AlexisPerry pushed a commit to llvm-project-tlp/llvm-project that referenced this pull request Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants