[llvm] [llvm-cov] format cells in code coverage report with 0/0 branches/functions/lines differently (PR #75780)

NAKAMURA Takumi via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 19 01:54:04 PST 2023


================
@@ -309,7 +323,9 @@ void emitTableRow(raw_ostream &OS, const CoverageViewOptions &Opts,
           RSO << '(' << Hit << '/' << Total << ')';
         }
         const char *CellClass = "column-entry-yellow";
-        if (Pctg >= Opts.HighCovWatermark)
+        if (!Total) {
+          CellClass = "column-entry-gray";
+        } else if (Pctg >= Opts.HighCovWatermark)
----------------
chapuni wrote:

What about this?

https://github.com/llvm/llvm-project/pull/75780


More information about the llvm-commits mailing list