[clang] [clang][OpenMP] Fix statement expressions in loop bounds being emitted more than once (PR #224939)

Shafik Yaghmour via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 22 19:08:35 PDT 2026


================
@@ -8282,6 +8282,8 @@ class OpenMPIterationSpaceChecker {
              SourceRange SR, SourceLocation SL);
   /// Helper to set loop increment.
   bool setStep(Expr *NewStep, bool Subtract);
+  /// Diagnose a statement expression in a bound of a non-rectangular loop.
+  bool checkNonRectangularBound(const Expr *E, bool IsInitializer) const;
----------------
shafik wrote:

```suggestion
  bool MaybeDiagnoseStmtExpr(const Expr *E, bool IsInitializer) const;
```
This feels like a more descriptive name and also reads better in the places where it is used CC @alexey-bataev 


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


More information about the cfe-commits mailing list