[llvm] [llvm-cov][CoverageView] minor fix/improvement to HTML and text coverage output (PR #80952)
Wentao Zhang via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 7 08:45:07 PST 2024
================
@@ -990,15 +993,13 @@ void SourceCoverageViewHTML::renderMCDCView(raw_ostream &OS, MCDCView &MRV,
std::string ColNoStr = Twine(DecisionRegion.ColumnStart).str();
std::string TargetName = "L" + LineNoStr;
OS << tag("span",
- a("#" + TargetName, tag("span", LineNoStr + ":" + ColNoStr),
- TargetName),
+ a("#" + TargetName, tag("span", LineNoStr + ":" + ColNoStr)),
----------------
whentojump wrote:
Problems arise if `!MCDCSubViews.empty()` is missing in `hasSubViews()`.
Because `!MCDCSubViews.empty()` is missing, HTML elements are placed somewhat unpredictably --> MC/DC view "boxes" are often placed on page top, instead of around the actual code --> URL ending with `#L19` will jump to the link within MC/DC view, because that one appears ealier with `name="L19"` than the actual code line number
https://github.com/llvm/llvm-project/pull/80952
More information about the llvm-commits
mailing list