Skip to content

Commit f6b0fda

Browse files
committed
[llvm-cov][CoverageViewHTML] remove name="Ln" attribute in the link within MC/DC views
Or it would conflict with the link at actual lines and jumping via URLs containing #Ln would fail
1 parent dd6af47 commit f6b0fda

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -993,15 +993,13 @@ void SourceCoverageViewHTML::renderMCDCView(raw_ostream &OS, MCDCView &MRV,
993993
std::string ColNoStr = Twine(DecisionRegion.ColumnStart).str();
994994
std::string TargetName = "L" + LineNoStr;
995995
OS << tag("span",
996-
a("#" + TargetName, tag("span", LineNoStr + ":" + ColNoStr),
997-
TargetName),
996+
a("#" + TargetName, tag("span", LineNoStr + ":" + ColNoStr)),
998997
"line-number") +
999998
") to (";
1000999
LineNoStr = utostr(uint64_t(DecisionRegion.LineEnd));
10011000
ColNoStr = utostr(uint64_t(DecisionRegion.ColumnEnd));
10021001
OS << tag("span",
1003-
a("#" + TargetName, tag("span", LineNoStr + ":" + ColNoStr),
1004-
TargetName),
1002+
a("#" + TargetName, tag("span", LineNoStr + ":" + ColNoStr)),
10051003
"line-number") +
10061004
")\n\n";
10071005

0 commit comments

Comments
 (0)