[PATCH] D151283: [llvm-cov] Support a Hierarchical Structure for HTML Coverage Report Generating

Yuhao Gu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 10 05:52:58 PDT 2023


AtomicGu added inline comments.


================
Comment at: llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp:674-695
+  // Emit the totals row.
+  emitTableRow(OSRef, Opts, "Totals", CurrentTotals, /*IsTotals=*/false);
+  OSRef << EndTable << EndCenteredDiv;
+
+  // Emit links to files which don't contain any functions. These are normally
+  // not very useful, but could be relevant for code which abuses the
+  // preprocessor.
----------------
phosek wrote:
> This code is duplicated between `CoveragePrinterHTML::createIndexFile` and `CoveragePrinterHTMLDirectory::createSubIndexFile`, could it be extracted into one or more helper functions?
These codes are tightly coupled with variables around them. It may needs more boilerplate code than the code extracted. I don't think it will make the code easier to read to extract them into a common helper function.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151283/new/

https://reviews.llvm.org/D151283



More information about the llvm-commits mailing list