[PATCH] D42767: [llvm-cov] Fix incorrect usage of .precision specifier in format() call.
Max Moroz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 31 14:09:21 PST 2018
Dor1s created this revision.
Dor1s added a reviewer: Dor1s.
Existing version doesn't work on Windows as it always prints 0.00.
Repository:
rL LLVM
https://reviews.llvm.org/D42767
Files:
tools/llvm-cov/SourceCoverageViewHTML.cpp
Index: tools/llvm-cov/SourceCoverageViewHTML.cpp
===================================================================
--- tools/llvm-cov/SourceCoverageViewHTML.cpp
+++ tools/llvm-cov/SourceCoverageViewHTML.cpp
@@ -343,7 +343,7 @@
{
raw_string_ostream RSO{S};
if (Total)
- RSO << format("%6.2f", 7, Pctg) << "% ";
+ RSO << format("%*.2f", 7, Pctg) << "% ";
else
RSO << "- ";
RSO << '(' << Hit << '/' << Total << ')';
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42767.132274.patch
Type: text/x-patch
Size: 471 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180131/08bf44be/attachment.bin>
More information about the llvm-commits
mailing list