[clang] [OpenMP] Add runtime selection for metadirective with non-constant conditions. (PR #192455)

Zahira Ammarguellat via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 7 11:54:14 PDT 2026


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


More information about the cfe-commits mailing list