[PATCH] D90210: [flang] [OpenMP 4.5] Add semantic checks for OpenMP Private clause

sameeran joshi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 27 01:41:17 PDT 2020


sameeranjoshi added inline comments.


================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:413-431
+  for (const auto &ompObject : x.v.v) {
+    if (const auto *name{parser::Unwrap<parser::Name>(ompObject)}) {
+      if (const auto *symbol{name->symbol}) {
+        if (const auto *commonBlockDetails{
+                symbol->detailsIf<CommonBlockDetails>()}) {
+          for (const auto &object : commonBlockDetails->objects()) {
+            CheckIntentInPointer(
----------------
Is it possible to extract this into a function and make it more generalized ?
I see copyprivate in OMP 4.5 standard restriction section point 10 in [2.15.4.2] too has a similar restriction, we can probably reuse it over there.



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

https://reviews.llvm.org/D90210



More information about the llvm-commits mailing list