[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:26:35 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:

Reset of SplitNestedLogicalOp could also probably be done in dataTraverseStmtPost() at the point where the diagnostic is emitted, but this is OK.

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


More information about the cfe-commits mailing list