[clang] [clang][CodeGen] Keep processing the rest of AST after encountering unsupported MC/DC expressions (PR #82464)

Alan Phipps via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 22 09:28:38 PST 2024


================
@@ -239,9 +239,12 @@ struct MapRegionCounters : public RecursiveASTVisitor<MapRegionCounters> {
     if (MCDCMaxCond == 0)
       return true;
 
-    /// At the top of the logical operator nest, reset the number of conditions.
-    if (LogOpStack.empty())
+    /// At the top of the logical operator nest, reset the number of conditions,
+    /// also forget previously seen split nesting cases.
+    if (LogOpStack.empty()) {
       NumCond = 0;
+      SplitNestedLogicalOp = false;
----------------
evodius96 wrote:

Definitely a bug that we weren't resetting this. 

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


More information about the cfe-commits mailing list