[flang-commits] [flang] [flang][OpenMP] Push context for all directives in resolve-directives.cpp (PR #181736)

Krzysztof Parzyszek via flang-commits flang-commits at lists.llvm.org
Wed Feb 18 05:52:49 PST 2026


kparzysz wrote:

The old code actually popped the context unconditionally while having the push-context guarded by the switch.  For loop and simple-standalone directives this was ok, because the switch covered all possible directives.

I checked this for block directives, and it turned out that the directives from the switch were the only ones for which the parser would create OmpBlockConstruct directly (i.e. without using a subclass of it).  In other words, the switch here also listed all possibilities, so no changes are necessary.

I've updated the commit message for block construct.

https://github.com/llvm/llvm-project/pull/181736


More information about the flang-commits mailing list