================
@@ -3010,6 +3010,28 @@ static bool FinishOpenMPLinearClause(OMPLinearClause 
&Clause, DeclRefExpr *IV,
                                      Expr *NumIterations, Sema &SemaRef,
                                      Scope *S, DSAStackTy *Stack);
 
+static bool finishLinearClauses(Sema &SemaRef, ArrayRef<OMPClause *> Clauses,
+                                OMPLoopBasedDirective::HelperExprs &B,
+                                DSAStackTy *Stack) {
+  assert((SemaRef.CurContext->isDependentContext() || B.builtAll()) &&
+         "loop exprs were not built");
+
+  if (SemaRef.CurContext->isDependentContext())
+    return false;
+
+  // Finalize the clauses that need pre-built expressions for CodeGen.
+  for (OMPClause *C : Clauses) {
+    if (auto *LC = dyn_cast<OMPLinearClause>(C)) {
----------------
alexey-bataev wrote:

```
auto *LC = dyn_cast<OMPLinearClause>(C);
if (!LC)
  continue;
```

https://github.com/llvm/llvm-project/pull/96811
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to