[PATCH] D90184: [flang][openacc] Semantic check for cache directive

Kiran Chandramohan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 25 01:01:24 PST 2020


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

LGTM.



================
Comment at: flang/lib/Semantics/resolve-directives.cpp:440-450
+  const evaluate::DataRef dataRef{*(name.symbol)};
+  return std::visit(
+      common::visitors{
+          [](const evaluate::SymbolRef &ref) { return ref->Rank() > 0; },
+          [](const evaluate::ArrayRef &aref) {
+            return aref.base().IsSymbol() ||
+                aref.base().GetComponent().base().Rank() == 0;
----------------
clementval wrote:
> kiranchandramohan wrote:
> > #just-saying: It will be useful if there is some general guidelines on when to use evaluate::DataRef.
> Sure, maybe adding something in the semantic check documentation would make sense. What do you think? 
Yes, that would be great.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90184



More information about the llvm-commits mailing list