[llvm] [clang] `llvm-cov` assertion failure when handling MC/DC that involves macros (PR #80098)

Wentao Zhang via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 31 00:04:48 PST 2024


================
@@ -1973,6 +1981,8 @@ struct CounterCoverageMappingBuilder
   void VisitBinLAnd(const BinaryOperator *E) {
     bool IsRootNode = MCDCBuilder.isIdle();
 
+    MCDCDebugCounter++;
----------------
whentojump wrote:

Hi thanks again for taking the look!
My intuition was to make the ID different whenever a new decision region is going to be added by calling `createDecisionRegion()`. There might be something obvious that I ignored.
And after reading some of the other posts (I'm still learning most of them, please bear with that!), I generally agree with the approaches whose modifications are minimized within `llvm-cov`, instead of touching the front end.

Regards

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


More information about the llvm-commits mailing list