ABataev added a comment. I would add checks for mapping of `declare target to/link` vars and checked if they work in runtime.
================ Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:9468-9469 CurSizes, CurMapTypes, PartialStruct); + if (!CI->capturesThis()) + MappedVarSet.insert(CI->getCapturedVar()->getCanonicalDecl()); + else ---------------- I would check that we capture a variable. We may capture VLA here as well. ================ Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:9470-9471 + MappedVarSet.insert(CI->getCapturedVar()->getCanonicalDecl()); + else + MappedVarSet.insert(nullptr); if (CurBasePointers.empty()) ---------------- No need to insert `nullptr` here, it is not used later. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83922/new/ https://reviews.llvm.org/D83922 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits