[clang] [clang] Fix static analyzer concerns (PR #110243)

Alexey Bataev via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 27 04:14:15 PDT 2024


================
@@ -9195,7 +9195,7 @@ static bool checkOpenMPIterationSpace(
         SemaRef.Diag(CollapseLoopCountExpr->getExprLoc(),
                      diag::note_omp_collapse_ordered_expr)
             << 0 << CollapseLoopCountExpr->getSourceRange();
-      else
+      else if (OrderedLoopCountExpr)
----------------
alexey-bataev wrote:

I think better to fix the logic in line 9189:
```
if ((CollapseLoopCountExpr && OrderedLoopCountExpr) || (!CollapseLoopCountExpr && !OrderedLoopCountExpr))
```

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


More information about the cfe-commits mailing list