[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:15:29 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL323923: [llvm-cov] Fix incorrect usage of .precision specifier in format() call. (authored by Dor1s, committed by ).

Repository:
  rL LLVM

https://reviews.llvm.org/D42767

Files:
  llvm/trunk/tools/llvm-cov/SourceCoverageViewHTML.cpp


Index: llvm/trunk/tools/llvm-cov/SourceCoverageViewHTML.cpp
===================================================================
--- llvm/trunk/tools/llvm-cov/SourceCoverageViewHTML.cpp
+++ llvm/trunk/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.132277.patch
Type: text/x-patch
Size: 504 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180131/12976570/attachment.bin>


More information about the llvm-commits mailing list