[PATCH] D150428: [flang][openmp] Allocators construct semantic checks

Kiran Chandramohan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 30 15:26:06 PDT 2023


kiranchandramohan added a comment.

Looks OK. Please add tests for all error messages that are added or updated.



================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:290
       context_.Say(source,
-          "If list items within the ALLOCATE directive have the "
+          "If list items within the %s directive have the "
           "SAVE attribute, are a common block name, or are "
----------------
Please add a test for `ALLOCATORS` with this error message.


================
Comment at: flang/lib/Semantics/resolve-directives.cpp:1585
+        context_.Say(x.source,
+            "ALLOCATORS directives that appear in a TARGET region "
+            "must specify an allocator"_err_en_US);
----------------
Please add a test for this.


================
Comment at: flang/lib/Semantics/resolve-directives.cpp:1765
                       "List items must be declared in the same scoping unit "
-                      "in which the ALLOCATE directive appears"_err_en_US);
+                      "in which the %s directive appears"_err_en_US,
+                      parser::ToUpperCaseLetters(
----------------
Please add a test for `ALLOCATORS` with this error message.


================
Comment at: flang/lib/Semantics/resolve-directives.cpp:2034
+            [&](const parser::Name &n) {
+              CheckNameInAllocateStmt(source, n, allocate);
+            },
----------------
Please add a test that exercises this path (Commonblocks?).


================
Comment at: flang/lib/Semantics/resolve-directives.cpp:2054
+  context_.Say(source,
+      "Object '%s' in %s directive not "
+      "found in corresponding ALLOCATE statement"_err_en_US,
----------------
Is this currently only called for the `allocate` in `allocators`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150428



More information about the llvm-commits mailing list