]> granicus.if.org Git - llvm/commitdiff
[llvm-cov] Fix a bot failure due to r313417
authorVedant Kumar <vsk@apple.com>
Fri, 15 Sep 2017 23:14:22 +0000 (23:14 +0000)
committerVedant Kumar <vsk@apple.com>
Fri, 15 Sep 2017 23:14:22 +0000 (23:14 +0000)
There's a type mismatch issue with the arguments to a call to std::min
introduced in r313417.

http://lab.llvm.org:8011/builders/clang-cmake-thumbv7-a15/builds/11174

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313422 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-cov/CoverageSummaryInfo.cpp

index 16ae8aaa4493192478c5d984a48f8439fdc35093..b9705c09ab62739e70e5754f436cf9d803fd92e2 100644 (file)
@@ -68,9 +68,9 @@ FunctionCoverageSummary::get(const coverage::FunctionRecord &Function) {
       for (unsigned I = CR.LineStart; I <= CR.LineEnd; ++I)
         ExecutionCounts[I - LineStart] = ExecutionCount;
     }
-    unsigned UncoveredLines =
-        std::min(std::count(ExecutionCounts.begin(), ExecutionCounts.end(), 0),
-                 (long)LinesNotSkipped);
+    unsigned UncoveredLines = std::min(
+        (unsigned)std::count(ExecutionCounts.begin(), ExecutionCounts.end(), 0),
+        (unsigned)LinesNotSkipped);
     CoveredLines += LinesNotSkipped - UncoveredLines;
     NumLines += LinesNotSkipped;
   }