ABataev added inline comments.
================ Comment at: clang/lib/AST/StmtOpenMP.cpp:2362 + const HelperExprs &Exprs) { + this->LoopDirCrParmV = new LoopDirCrParam(C, StartLoc, EndLoc, CollapsedNum, + Clauses, AssociatedStmt, Exprs); ---------------- We use tail allocation, this is definetely a mem leak. ================ Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:7815-7851 + for (const auto *C : S.getClausesOfKind<OMPBindClause>()) { + OpenMPBindClauseKind bindParam = C->getBindKind(); + switch (bindParam) { + case OMPC_BIND_parallel: { + OMPForDirective *ompForD = OMPForDirective::Create( + *(S.LoopDirCrParmV->C), S.LoopDirCrParmV->StartLoc, + S.LoopDirCrParmV->EndLoc, S.LoopDirCrParmV->CollapsedNum, newAClauses, ---------------- This is a bad place for this kind of operation here, it should be handled in Sema CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144634/new/ https://reviews.llvm.org/D144634 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits