[PATCH] D109685: [flang][OpenMP] Add semantic check for threadprivate directive

Kiran Chandramohan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 13 07:57:21 PDT 2021


kiranchandramohan accepted this revision.
kiranchandramohan added a comment.
This revision is now accepted and ready to land.

LGTM. I have some Nit comments. Please fix it if possible.

What about the other checks?



================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:1553-1561
+                        "A variable that is part of another variable (as an "
+                        "array or structure element) cannot appear in an %s "
+                        "directive"_err_en_US,
+                        ContextDirectiveAsFortran());
+                  } else {
+                    context_.Say(source,
+                        "A variable that is part of another variable (as an "
----------------
Nit: Would having a lambda be a better option? The lambda can take the clause or directive as an argument.



================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:1554
+                        "A variable that is part of another variable (as an "
+                        "array or structure element) cannot appear in an %s "
+                        "directive"_err_en_US,
----------------
Nit: an THREADPRIVATE -> a THREADPRIVATE


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109685



More information about the llvm-commits mailing list