[PATCH] D127803: Generate the capture for field when the field is used in openmp region with implicit default in the member function.

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 30 12:47:42 PDT 2022


ABataev added inline comments.


================
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.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127803/new/

https://reviews.llvm.org/D127803



More information about the cfe-commits mailing list