[PATCH] D89562: [flang]Add Parser Support for OpenMP Allocate Directive

Irina Dobrescu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 27 07:24:37 PDT 2020


Rin marked 3 inline comments as done.
Rin added inline comments.


================
Comment at: flang/include/flang/Parser/parse-tree.h:3630
+  std::tuple<Verbatim, std::optional<OmpObjectList>,
+      std::optional<AllocatorClause>, Statement<AllocateStmt>>
+      t;
----------------
clementval wrote:
> You should use the OmpClauseList and let the semantic check do the work. Otherwise each directive will have there own parser for theirs associated directive and this duplicates the code a lot. 
> 
> `OMP.td` is already good for this directive. 
> 
> ```
> def OMP_Allocate : Directive<"allocate"> {
>   let allowedClauses = [
>     VersionedClause<OMPC_Allocator>
>   ];
> }
> ```
Thanks for that. I'll make sure to do so.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89562/new/

https://reviews.llvm.org/D89562



More information about the llvm-commits mailing list