zahiraam wrote: > After some thoughts, I thinkg need to correct this one: > > > Parser: Parse all variant directives completely (including clauses) by > > calling the normal directive parsing path. Parse the body once. > > Different directives may use different data-sharing attributes for the same > variable, so looks like need to reparse the body for each directive > separately and attach to each particular directive, because they may have > different privates/shared/reductions/etc. So, Sema also should build > directives with bodies. > > Everything else looks good
Understood. So, each variant directive needs its own parsed body (with proper CapturedStmt) because different directives may have different data-sharing attributes (private/shared/reduction) for the same variables. I'll parse the body separately for each variant directive, and Sema builds complete directives with bodies attached. https://github.com/llvm/llvm-project/pull/192455 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
