mirror-llvm-project/flang/lib/Semantics
Krzysztof Parzyszek ce1c15a062 [flang][OpenMP] Version-dependent parsing of map-type-modifier
Up until 5.2, ALWAYS, CLOSE, and PRESENT were keywords of the
map-type-modifier. Starting from 6.0 they all became their own
single-keyword modifiers. This allowed specifying them together,
unlike in the past where map-type-modifier was unique.

To avoid using a single representation of the modifiers, and be
able to validate them through non-conditional properties, the
AST was rewritten back to the older form in canonicalization
when the spec version was set to 5.2 or earlier.

Now that the parser is version-aware, it can generate the desired
AST from the start.

Additionally, extract the OMPX_HOLD modifier out of the map-type-
modifier into its own AST node regardless of version.
2026-08-01 12:53:25 -05:00
..
assignment.cpp [flang][NFC] Remove unnecessary #include directives across flang (#207640) 2026-07-08 00:53:12 +00:00
assignment.h [flang][OpenMP] Rename "declare constructs" to directives, NFC (#194240) 2026-04-26 10:44:07 -05:00
attr.cpp
canonicalize-acc.cpp [flang][semantics][openacc] Allow collapse clauses on do concurrent (#192488) 2026-04-27 07:42:28 -07:00
canonicalize-acc.h
canonicalize-directives.cpp [Flang] Add INLINEALWAYS Compiler Directive (#192674) 2026-04-24 09:58:43 +01:00
canonicalize-directives.h
canonicalize-do.cpp [flang] Accept label DO loop after !$ACC LOOP (#187581) 2026-03-23 07:38:45 -07:00
canonicalize-do.h
canonicalize-omp.cpp [flang][OpenMP] Version-dependent parsing of map-type-modifier 2026-08-01 12:53:25 -05:00
canonicalize-omp.h
check-acc-structure.cpp [flang] Provide "clause set" type as parameter to DirectiveStructureChecker (#211326) 2026-07-24 05:59:06 -05:00
check-acc-structure.h [flang] Add missing std includes (#211830) 2026-07-24 12:36:14 -05:00
check-allocate.cpp [flang] Add new warnings for unused & undefined locals (#173504) 2025-12-31 12:42:06 -08:00
check-allocate.h [flang][semantics] add semantic check that STAT and ERRMSG are not (de)allocated by same statement (#164529) 2025-10-31 10:26:27 -07:00
check-arithmeticif.cpp
check-arithmeticif.h
check-call.cpp [flang][cuda] Do not check dummy in stmt function in device code (#212037) 2026-07-27 11:42:48 -07:00
check-call.h [flang][Semantics] Do not require explicit interface checks for statement functions (#205023) 2026-06-22 17:35:32 -04:00
check-case.cpp [flang][NFC] Remove unnecessary #include directives across flang (#207640) 2026-07-08 00:53:12 +00:00
check-case.h
check-coarray.cpp [flang] Refactor "unused"/"used without definition" warnings (#179539) 2026-02-06 09:29:50 -08:00
check-coarray.h
check-cuda.cpp [flang][cuda] Accept statement function in device code (#211957) 2026-07-25 01:07:01 +00:00
check-cuda.h [flang][cuda] Emit error when trying to print device data (#160395) 2025-09-23 21:27:30 +00:00
check-data.cpp [flang][NFC] Remove unnecessary #include directives across flang (#207640) 2026-07-08 00:53:12 +00:00
check-data.h [flang][NFC] Remove unnecessary #include directives across flang (#207640) 2026-07-08 00:53:12 +00:00
check-deallocate.cpp [flang][NFC] Remove unnecessary #include directives across flang (#207640) 2026-07-08 00:53:12 +00:00
check-deallocate.h
check-declarations.cpp [flang][cuda] Allow host procedure references in host,device subprograms (#206736) 2026-06-30 14:16:30 -04:00
check-declarations.h
check-directive-structure.h [flang] Add missing std includes (#211830) 2026-07-24 12:36:14 -05:00
check-do-forall.cpp [flang][NFC] Remove unnecessary #include directives across flang (#207640) 2026-07-08 00:53:12 +00:00
check-do-forall.h [flang][Semantics] Warn on repeated do-variable in nested I/O implied DO (#198757) 2026-06-16 14:07:07 -04:00
check-if-stmt.cpp [flang][NFC] Remove unnecessary #include directives across flang (#207640) 2026-07-08 00:53:12 +00:00
check-if-stmt.h
check-io.cpp [flang] Enforce F2018 C1221: ADVANCE and REC specifiers are mutually exclusive (#195170) 2026-05-15 12:21:38 -05:00
check-io.h [flang] Warn about assumed-rank items in I/O lists (#182957) 2026-02-26 06:59:49 -08:00
check-namelist.cpp [flang] Reject PARAMETER constants in NAMELIST groups (#178960) 2026-03-05 16:26:54 -06:00
check-namelist.h
check-nullify.cpp [flang][NFC] Remove unnecessary #include directives across flang (#207640) 2026-07-08 00:53:12 +00:00
check-nullify.h
check-omp-atomic.cpp [flang][OpenMP] Centralize pushing/popping directive context (#204924) 2026-06-22 09:25:25 -05:00
check-omp-loop.cpp [flang][OpenMP] Use llvm::omp::DirectiveSet instead of common::EnumSet (#211325) 2026-07-24 05:59:05 -05:00
check-omp-structure.cpp [flang][openmp] Add semantic checks in THREADPRIVATE/DECLARE TARGET (#209084) 2026-07-29 22:56:33 +05:30
check-omp-structure.h [OpenMP] Split UPDATE clause into two: for ATOMIC and for DEPOBJ (#212270) 2026-07-29 07:30:31 -05:00
check-omp-variant.cpp [flang][OpenMP] Split DEFAULT into DEFAULT(dsa) and DEFAULT(variant) (#212128) 2026-07-27 10:02:10 -05:00
check-purity.cpp [flang] Catch doubly-nested internal subprograms (#175992) 2026-01-19 11:00:05 -08:00
check-purity.h [flang] Catch doubly-nested internal subprograms (#175992) 2026-01-19 11:00:05 -08:00
check-return.cpp
check-return.h
check-select-rank.cpp [flang][NFC] Remove unnecessary #include directives across flang (#207640) 2026-07-08 00:53:12 +00:00
check-select-rank.h
check-select-type.cpp [flang][NFC] Remove unnecessary #include directives across flang (#207640) 2026-07-08 00:53:12 +00:00
check-select-type.h
check-stop.cpp [flang][NFC] Remove unnecessary #include directives across flang (#207640) 2026-07-08 00:53:12 +00:00
check-stop.h
CMakeLists.txt [flang][OpenMP] Rename check-omp-metadirective.cpp (NFC). (#201159) 2026-06-03 10:34:09 +01:00
compute-offsets.cpp [flang][NFC] Remove unnecessary #include directives across flang (#207640) 2026-07-08 00:53:12 +00:00
compute-offsets.h
data-to-inits.cpp [flang] Allow multiple identical DATA initializations (#177063) 2026-01-22 07:32:53 -08:00
data-to-inits.h [flang] Allow multiple identical DATA initializations (#177063) 2026-01-22 07:32:53 -08:00
definable.cpp [flang][cuda] Allow host variables to be defined in device subprograms under -gpu=unified (#192118) 2026-04-14 20:11:31 +00:00
definable.h [flang] Downgrade an overly strict error to a warning (#187524) 2026-03-19 15:27:01 -05:00
dump-expr.cpp [flang] Adding NOTIFY specifier in image selector and add notify type checks (#148810) 2025-11-05 16:35:25 +01:00
expression.cpp [flang] Add semantics support for Fortran 2023 conditional arguments (F2023 R1526-R1528) (#195345) 2026-07-15 12:20:50 -04:00
mod-file.cpp [flang] Pass LangOptions to parser via UserState 2026-08-01 12:33:13 -05:00
mod-file.h [flang][OpenMP] Lower cross-module user-defined declare reduction (#207493) 2026-07-15 12:34:46 -05:00
openmp-dsa.cpp [flang][OpenMP][NFC] Share SetSymbolDSA between semantics and lowering (#207826) 2026-07-07 13:09:50 -05:00
openmp-modifiers.cpp [OpenMP] Split UPDATE clause into two: for ATOMIC and for DEPOBJ (#212270) 2026-07-29 07:30:31 -05:00
openmp-utils.cpp [flang][OpenMP] Implement the error directive (#206175) 2026-07-24 10:43:05 -04:00
pointer-assignment.cpp [flang][NFC] Remove unnecessary #include directives across flang (#207640) 2026-07-08 00:53:12 +00:00
pointer-assignment.h
program-tree.cpp [flang][openacc] Ignore bare acc routine in module subprogram part instead of erroring out (#205450) 2026-06-25 17:33:50 +00:00
resolve-directives.cpp [flang][openmp] Add semantic checks in THREADPRIVATE/DECLARE TARGET (#209084) 2026-07-29 22:56:33 +05:30
resolve-directives.h [flang][OpenMP] Emit requirements in module files (#163449) 2025-10-16 07:02:49 -05:00
resolve-labels.cpp [flang][NFC] Remove unnecessary #include directives across flang (#207640) 2026-07-08 00:53:12 +00:00
resolve-labels.h
resolve-names-utils.cpp [flang][semantic] parser node types and rewrite for assumed-shape-bounds-spec (#211690) 2026-07-24 14:12:09 -04:00
resolve-names-utils.h [flang][NFC] Remove unnecessary #include directives across flang (#207640) 2026-07-08 00:53:12 +00:00
resolve-names.cpp [flang][semantics] Accept BOZ initializers for C enum values (#211904) 2026-07-29 11:42:04 -07:00
resolve-names.h
rewrite-parse-tree.cpp [flang] Enumeration Type: (PR 2/5) Name Resolution + Expression + Relational + SELECT CASE (#193028) 2026-06-30 12:24:57 -05:00
rewrite-parse-tree.h
runtime-type-info.cpp [flang][NFC] Remove unnecessary #include directives across flang (#207640) 2026-07-08 00:53:12 +00:00
scope.cpp [flang][NFC] Remove unnecessary #include directives across flang (#207640) 2026-07-08 00:53:12 +00:00
semantics.cpp [flang][semantics][OpenACC] Warn for DEFAULT(NONE) scalars by default (#205683) 2026-06-25 16:17:37 -07:00
symbol.cpp [flang][OpenMP] Use llvm::omp::ClauseSet instead of common::EnumSet (#211324) 2026-07-24 05:59:05 -05:00
tools.cpp [flang] Enumeration Type: (PR 2/5) Name Resolution + Expression + Relational + SELECT CASE (#193028) 2026-06-30 12:24:57 -05:00
type.cpp Reapply "[flang] Enumeration Type: (PR 1/5) Foundation types + Parser" (#202440) 2026-06-08 16:56:24 -05:00
unparse-with-symbols.cpp [flang][OpenMP] Consistent names for non-executable directives, NFC (#196803) 2026-05-10 09:32:19 -05:00