[flang-commits] [flang] [flang][OpenMP] move omp end directive validation to semantics (PR #154739)
Krzysztof Parzyszek via flang-commits
flang-commits at lists.llvm.org
Thu Aug 21 06:53:05 PDT 2025
================
@@ -4783,15 +4783,25 @@ struct OmpEndDirective : public OmpDirectiveSpecification {
// Common base class for block-associated constructs.
struct OmpBlockConstruct {
TUPLE_CLASS_BOILERPLATE(OmpBlockConstruct);
+ ENUM_CLASS(Flags, None, MissingMandatoryEndDirective);
----------------
kparzysz wrote:
Do we need a flag for this? All loosely-structured blocks need it, and it's easy to tell whether a block is strictly- or loosely-structured (single BLOCK vs. sequence that doesn't start with BLOCK). I think we could simply have an optional end-directive in this case as well without the flag, and check the type of block in semantics.
https://github.com/llvm/llvm-project/pull/154739
More information about the flang-commits
mailing list