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

2024-05-22 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni closed https://github.com/llvm/llvm-project/pull/89572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-05-22 Thread Alan Phipps via cfe-commits
https://github.com/evodius96 approved this pull request. https://github.com/llvm/llvm-project/pull/89572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-05-22 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/89572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-05-22 Thread Jessica Paquette via cfe-commits
https://github.com/ornata approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/89572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-05-20 Thread NAKAMURA Takumi via cfe-commits
@@ -190,6 +190,16 @@ class SourceMappingRegion { bool isBranch() const { return FalseCount.has_value(); } + bool isMCDCBranch() const { +const auto *BranchParams = std::get_if(); +assert(BranchParams == nullptr || BranchParams->ID >= 0); +return (BranchParams

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

2024-05-20 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/89572 >From 13035b230fd51422f6c3223fcffab4f44bd00956 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Fri, 19 Apr 2024 15:26:34 +0900 Subject: [PATCH 1/4] [MC/DC][Coverage] Add assertions into emitSourceRegions()

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

2024-05-19 Thread Jessica Paquette via cfe-commits
@@ -190,6 +190,16 @@ class SourceMappingRegion { bool isBranch() const { return FalseCount.has_value(); } + bool isMCDCBranch() const { +const auto *BranchParams = std::get_if(); +assert(BranchParams == nullptr || BranchParams->ID >= 0); +return (BranchParams

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

2024-04-22 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/89572 >From 13035b230fd51422f6c3223fcffab4f44bd00956 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Fri, 19 Apr 2024 15:26:34 +0900 Subject: [PATCH 1/2] [MC/DC][Coverage] Add assertions into emitSourceRegions()

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

2024-04-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: NAKAMURA Takumi (chapuni) Changes `emitSourceRegions()` has bugs to emit malformed MC/DC coverage mappings. They were detected in `llvm-cov` as the crash. Detect inconsistencies earlier in `clang` with

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

2024-04-22 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/89572 `emitSourceRegions()` has bugs to emit malformed MC/DC coverage mappings. They were detected in `llvm-cov` as the crash. Detect inconsistencies earlier in `clang` with assertions. * mcdc-system-headers.cpp