[flang] [OpenMP] parse tree changes for standalone directives (flang-compiler/f18...
authorJinxin (Brian) Yang <jinxiny@nvidia.com>
Tue, 6 Aug 2019 18:59:40 +0000 (11:59 -0700)
committerGitHub <noreply@github.com>
Tue, 6 Aug 2019 18:59:40 +0000 (11:59 -0700)
commitc4e13f6be84ca391458f3ee5e83242be2145f2df
tree125c1c0a0188e912be13f09b63a9bfe488b9cd51
parentfb30d812e7d04d23b69ccdef7499e904a8e6cb41
[flang] [OpenMP] parse tree changes for standalone directives (flang-compiler/f18#627)

* [OpenMP] parse tree changes for standalone directives

1. Put all standalone directives except FLUSH, CANCEL, and CANCELLATION POINT
   into one `OpenMPSimpleStandaloneConstruct` (for no-clause directive,
   validity checks will be deferred to Semantics). A top-level class will
   include all the standalone directive nodes. This simplies the logic a lot.

2. All the standalone directives now have their own source provenance for
   directive name itself.

3. Change check-omp-structure.* to avoid assertions

4. Add basic tests for standalone directives, more will be added during
   the clause validity checks in Semantics

* Resolve !$OMP ORDERED ambiguity by attempting block construct first - Peter

Original-commit: flang-compiler/f18@a77aa7ed84880927dea3e2b1bb6433350f99f1ac
Reviewed-on: https://github.com/flang-compiler/f18/pull/627
flang/lib/parser/dump-parse-tree.h
flang/lib/parser/openmp-grammar.h
flang/lib/parser/parse-tree.h
flang/lib/parser/unparse.cc
flang/lib/semantics/check-omp-structure.cc
flang/lib/semantics/check-omp-structure.h
flang/test/semantics/omp-clause-validity01.f90