[clang] [MC/DC][Coverage] Add assertions into emitSourceRegions() (PR #89572)

Jessica Paquette via cfe-commits cfe-commits at lists.llvm.org
Sun May 19 21:09:14 PDT 2024


================
@@ -190,6 +190,16 @@ class SourceMappingRegion {
 
   bool isBranch() const { return FalseCount.has_value(); }
 
+  bool isMCDCBranch() const {
+    const auto *BranchParams = std::get_if<mcdc::BranchParameters>(&MCDCParams);
+    assert(BranchParams == nullptr || BranchParams->ID >= 0);
+    return (BranchParams != nullptr);
+  }
+
+  const auto &getMCDCBranchParams() const {
----------------
ornata wrote:

unused function?

https://github.com/llvm/llvm-project/pull/89572


More information about the cfe-commits mailing list