[clang] [clang] Fix static analyzer concerns (PR #110243)
Mariya Podchishchaeva via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 27 04:21:28 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)
----------------
Fznamznon wrote:
The problem with this approach is that both `OrderedLoopCountExpr` and `CollapseLoopCountExpr` will be dereferenced on lines 9192 and 9193 if they're both are `nullptr`s.
https://github.com/llvm/llvm-project/pull/110243
More information about the cfe-commits
mailing list