[PATCH] D91159: [flang][openmp] Add General Semantic Checks for Allocate Directive

Valentin Clement via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 26 08:48:34 PDT 2021


clementval added inline comments.


================
Comment at: flang/lib/Semantics/resolve-directives.cpp:369
 
+  bool IsInsideTargetDirective();
   void ResolveOmpObjectList(const parser::OmpObjectList &, Symbol::Flag);
----------------
I_Perry wrote:
> clementval wrote:
> > Would be even nicer to have a generic function like `bool IsNestedInDirective(const llvm::omg::Directive dir)` so it can be reused later for other check. Might even be in the common class For OpenACC and OpenMP. 
> > 
> > No need to do it in this revision but just keep the idea in mind. 
> I'm looking into making a more generic function for this purpose as part of this patch, do you know if anyone has implemented anything like `IsNestedInDirective`
> already at this point?
There are couple of functions that are close to this but I'm not aware of a `IsNestedInDirective` at this point. 

https://github.com/llvm/llvm-project/blob/9d08f276d79b59e3d1ad3db3db19077284524ca3/flang/lib/Semantics/check-acc-structure.cpp#L67

https://github.com/llvm/llvm-project/blob/9d08f276d79b59e3d1ad3db3db19077284524ca3/flang/lib/Semantics/check-directive-structure.h#L254

The closest is probably this one: 
https://github.com/llvm/llvm-project/blob/9d08f276d79b59e3d1ad3db3db19077284524ca3/flang/lib/Semantics/check-directive-structure.h#L243


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91159



More information about the llvm-commits mailing list