[PATCH] D26615: [llvm-cov] Avoid 0% when reporting something that's 0/0

Alex Lorenz via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 14 09:06:16 PST 2016


arphaman created this revision.
arphaman added a reviewer: vsk.
arphaman added a subscriber: llvm-commits.
arphaman set the repository for this revision to rL LLVM.

Right now llvm-cov can show `0% (0/0)` coverage for things like file function coverage, etc. in reports and HTML output. This can happen for files like headers that have macros but no functions. This patch makes llvm-cov report `- (0/0)` instead.

Example: “include/clang/AST/BuiltinTypes.def” has `0% (0/0)` in http://lab.llvm.org:8080/coverage/coverage-reports/clang/index.html .


Repository:
  rL LLVM

https://reviews.llvm.org/D26615

Files:
  test/tools/llvm-cov/Inputs/zeroFunctionFile.covmapping
  test/tools/llvm-cov/Inputs/zeroFunctionFile.h
  test/tools/llvm-cov/Inputs/zeroFunctionFile.profdata
  test/tools/llvm-cov/zeroFunctionFile.c
  tools/llvm-cov/CoverageReport.cpp
  tools/llvm-cov/SourceCoverageViewHTML.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26615.77822.patch
Type: text/x-patch
Size: 5267 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161114/af01dc44/attachment.bin>


More information about the llvm-commits mailing list