Skip to content

Commit 7429597

Browse files
committedJan 31, 2018
[llvm-cov] Fix incorrect usage of .precision specifier in format() call.
Summary: Existing version doesn't work on Windows as it always prints 0.00. Reviewers: Dor1s Reviewed By: Dor1s Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D42767 llvm-svn: 323923
1 parent 43e94b1 commit 7429597

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ void CoveragePrinterHTML::emitFileSummary(raw_ostream &OS, StringRef SF,
343343
{
344344
raw_string_ostream RSO{S};
345345
if (Total)
346-
RSO << format("%6.2f", 7, Pctg) << "% ";
346+
RSO << format("%*.2f", 7, Pctg) << "% ";
347347
else
348348
RSO << "- ";
349349
RSO << '(' << Hit << '/' << Total << ')';

0 commit comments

Comments
 (0)
Please sign in to comment.