[flang-commits] [PATCH] D90834: [Flang][OpenMP][NFC][2/2] Reorder OmpStructureChecker and simplify it.

sameeran joshi via Phabricator via flang-commits flang-commits at lists.llvm.org
Sat Nov 21 08:21:45 PST 2020


sameeranjoshi marked 3 inline comments as done.
sameeranjoshi added inline comments.


================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:489
+  std::string commaSeperatedMapTypes;
+  llvm::interleave(
+      allowedMapTypeList.begin(), allowedMapTypeList.end(),
----------------
kiranchandramohan wrote:
> Is  commaSeperatedMapTypes created (and not used) in cases where there is no error?
Yes, thanks for catching those needless allocations.
I will allocate them only when there is error case.


================
Comment at: flang/test/Semantics/omp-combined-constructs.f90:208
 
-  !ERROR: Only the TO, FROM, TOFROM, or ALLOC map types are permitted for MAP clauses on the TARGET TEAMS directive
   !$omp target teams map(delete:a)
----------------
kiranchandramohan wrote:
> #justsaying: I liked the "or" in the message. 
I had thought initially, by passing (total-size-of-list-1) elements to `llvm::interleave`, and use `"or [last-element-in-list]"` inside the error message, but that would have probably needed a check based on the size of list and specifically for 0 size tests, also it looked too odd to reference only the last element in list, hence skipped it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90834



More information about the flang-commits mailing list