================ @@ -2966,7 +2972,17 @@ StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective( getLangOpts().OpenMPIRBuilder) AssociatedStmt = Actions.ActOnOpenMPLoopnest(AssociatedStmt.get()); } - AssociatedStmt = Actions.ActOnOpenMPRegionEnd(AssociatedStmt, Clauses); + if (!Leaves.empty()) { + size_t i = Leaves.size() - 1; + AssociatedStmt = Actions.ActOnOpenMPRegionEnd( + AssociatedStmt, Clauses, [&](StmtResult S) { + return Actions.ActOnOpenMPExecutableDirective( + Leaves[i--], DirName, CancelRegion, Clauses, S.get(), + Loc, EndLoc); + }); ---------------- alexey-bataev wrote:
Can we somehow avoid callback here? https://github.com/llvm/llvm-project/pull/84817 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits