[PATCH] D127803: Generate the capture for field when the field is used in openmp region with implicit default in the member function.
Jennifer Yu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 30 18:16:52 PDT 2022
jyu2 added inline comments.
Comment at: clang/lib/Sema/SemaOpenMP.cpp:212
+ /// List of captuer fields
+ llvm::SmallVector<ImplicitDefaultFDInfoTy, 8>
Comment at: clang/lib/Sema/TreeTransform.h:122
+ /// the RebuildME uses to set if member expression needs to be rebuilt.
+ bool RebuildME = false;
> jyu2 wrote:
> > ABataev wrote:
> > > I think we don't need to add a new field here. Can instead we have a check for regions with default clauses, if possible?
> > It seems during the TransformMemberExpr, I can not get Directives info for omp regions to check. Could you give me hand?
> > Thanks.
> Yes, we do not rebuild the DSA stack at the time of the instantiation. Can you just check that we're inside OpenMPCapturedRegion? Something like getCurCapturedRegion()->CapRegionKind == CR_OpenMP? Or walk the stack of regions to find the outer OpenMP region, if any.
Thank you so much for the help. I add new function in Sema to do this. Hope that is okay with you.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the cfe-commits