[llvm-branch-commits] [clang] [flang] [llvm] [Clang][OpenMP] Add permutation clause (PR #92030)

Alexey Bataev via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed May 22 06:03:42 PDT 2024


================
@@ -15972,6 +15971,12 @@ StmtResult SemaOpenMP::ActOnOpenMPInterchangeDirective(
     return OMPInterchangeDirective::Create(Context, StartLoc, EndLoc, Clauses,
                                            NumLoops, AStmt, nullptr, nullptr);
 
+  // An invalid expression in the permutation clause is set to nullptr in
+  // ActOnOpenMPPermutationClause.
+  if (PermutationClause && llvm::any_of(PermutationClause->getArgsRefs(),
+                                        [](Expr *E) { return !E; }))
----------------
alexey-bataev wrote:

Use is_contained

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


More information about the llvm-branch-commits mailing list