aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-cov/SourceCoverageViewText.cpp
diff options
context:
space:
mode:
authorWentao Zhang <35722712+whentojump@users.noreply.github.com>2024-02-16 23:24:31 -0600
committerGitHub <noreply@github.com>2024-02-16 23:24:31 -0600
commit0bf4f82f661817c79bd538c82c99515837cf1cf8 (patch)
tree899043874f9673329feba3c1e4156e30d159a260 /llvm/tools/llvm-cov/SourceCoverageViewText.cpp
parent80fcecb13c388ff087a27a4b0e7ca3dd8c98eaa4 (diff)
downloadllvm-0bf4f82f661817c79bd538c82c99515837cf1cf8.zip
llvm-0bf4f82f661817c79bd538c82c99515837cf1cf8.tar.gz
llvm-0bf4f82f661817c79bd538c82c99515837cf1cf8.tar.bz2
[llvm-cov][CoverageView] minor fix/improvement to HTML and text coverage output (#80952)
1. add the missing condition for MC/DC in hasSubViews() 2. add style for selected line 3. remove name="Ln" attribute in the link within MC/DC views 4. remove color for \n
Diffstat (limited to 'llvm/tools/llvm-cov/SourceCoverageViewText.cpp')
-rw-r--r--llvm/tools/llvm-cov/SourceCoverageViewText.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/tools/llvm-cov/SourceCoverageViewText.cpp b/llvm/tools/llvm-cov/SourceCoverageViewText.cpp
index 73b7ffe..580da45 100644
--- a/llvm/tools/llvm-cov/SourceCoverageViewText.cpp
+++ b/llvm/tools/llvm-cov/SourceCoverageViewText.cpp
@@ -382,7 +382,8 @@ void SourceCoverageViewText::renderMCDCView(raw_ostream &OS, MCDCView &MRV,
colored_ostream(OS, raw_ostream::RED,
getOptions().Colors && Record.getPercentCovered() < 100.0,
/*Bold=*/false, /*BG=*/true)
- << format("%0.2f", Record.getPercentCovered()) << "%\n";
+ << format("%0.2f", Record.getPercentCovered()) << "%";
+ OS << "\n";
renderLinePrefix(OS, ViewDepth);
OS << "\n";
}