================
@@ -308,13 +309,21 @@ Error 
RawCoverageMappingReader::readMappingRegionsSubArray(
             return Err;
           if (auto Err = readIntMax(FID, std::numeric_limits<unsigned>::max()))
             return Err;
+          if (ID == 0)
+            return make_error<CoverageMapError>(
+                coveragemap_error::malformed,
+                "MCDCConditionID shouldn't be zero");
+          Params = CounterMappingRegion::MCDCBranchParameters{
+              (unsigned)ID, (unsigned)TID, (unsigned)FID};
----------------
ornata wrote:

`static_cast`?

https://github.com/llvm/llvm-project/pull/81227
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to