[clang] [llvm] [MC/DC] Refactor: Make `MCDCParams` as `std::variant` (PR #81227)
Jessica Paquette via cfe-commits
cfe-commits at lists.llvm.org
Sun Feb 11 18:38:23 PST 2024
================
@@ -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
More information about the cfe-commits
mailing list