llvm-project
cf25fb1e - [flang][OpenMP] Add structure checks for DECLARE VARIANT (#198799)

Commit
71 days ago
[flang][OpenMP] Add structure checks for DECLARE VARIANT (#198799) This PR adds declare-variant structure checking. Following checks are added: - Validate [base:]variant arguments (including implicit base for single-name form). - Require exactly one MATCH clause; reject a second MATCH on the same directive. - Reject duplicate (base, variant) across multiple declare variant directives. - Reject clauses not allowed on declare variant. - Apply shared context-selector checks to MATCH (reuse metadirective logic). - Require constant user conditions in MATCH for declare variant (dynamic selectors deferred). Refactor metadirective support: - Extract CheckContextSelectorSpecification for reuse. - Reject SCORE on trait sets that do not allow it (also affects metadirective). Co-authored-by: Cursor <cursoragent@cursor.com>
Author
Parents
Loading