[PATCH] D91920: [Flang] [OpenMP] Add semantic checks for OpenMP firstprivate , lastprivate and copyprivate clauses

Valentin Clement via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 25 09:00:43 PST 2021


clementval added inline comments.


================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:1015
+        std::visit(common::visitors{
+                       [&](const parser::OmpClause::Private &x) {
+                         if (enclosingClauseSet.test(
----------------
kiranchandramohan wrote:
> praveen wrote:
> > kiranchandramohan wrote:
> > > Having to hard-code this looks unfortunate. Can you add a TODO to replace this hardcoding? Try one of the following,
> > > 1) autogen checks
> > > 2) or an autogenerated function which maps parser::OmpClause::<name> to llvm::omp::Clause::OMPC_<name>
> > @kiranchandramohan Will try to add autogenerated function / autogen checks for the same
> @clementval Is it currently possible to get the llvm::omp::Clause corresponding to a parser::OmpClause in a function? 
> From the top of your head is there a different way to write this std::visit?
We do not have such a function generated by TableGen right now. That would be a nice addition and useful in many places. 


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

https://reviews.llvm.org/D91920



More information about the llvm-commits mailing list