llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Mariya Podchishchaeva (Fznamznon) <details> <summary>Changes</summary> It seems in checkOpenMPIterationSpace `OrderedLoopCountExpr` can also be null, so check before dereferencing. --- Full diff: https://github.com/llvm/llvm-project/pull/110243.diff 1 Files Affected: - (modified) clang/lib/Sema/SemaOpenMP.cpp (+1-1) ``````````diff diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp index 9afb8cea26fe78..8615da4b044a82 100644 --- a/clang/lib/Sema/SemaOpenMP.cpp +++ b/clang/lib/Sema/SemaOpenMP.cpp @@ -9195,7 +9195,7 @@ static bool checkOpenMPIterationSpace( SemaRef.Diag(CollapseLoopCountExpr->getExprLoc(), diag::note_omp_collapse_ordered_expr) << 0 << CollapseLoopCountExpr->getSourceRange(); - else + else if (OrderedLoopCountExpr) SemaRef.Diag(OrderedLoopCountExpr->getExprLoc(), diag::note_omp_collapse_ordered_expr) << 1 << OrderedLoopCountExpr->getSourceRange(); `````````` </details> https://github.com/llvm/llvm-project/pull/110243 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits