[PATCH] D91159: [flang][openmp] Add General Semantic Checks for Allocate Directive
Kiran Chandramohan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 19 16:04:03 PDT 2021
kiranchandramohan accepted this revision.
kiranchandramohan added a comment.
LGTM.
@clementval do you have more comments?
================
Comment at: flang/lib/Semantics/resolve-directives.cpp:1345
+ const auto &clauseList{std::get<parser::OmpClauseList>(x.t)};
+ for (const auto &clause : clauseList.v) {
+ if (std::get_if<parser::OmpClause::Allocator>(&clause.u))
----------------
Nit: Can probably use parser::Unwrap on the clauselist to check for the allocator.
================
Comment at: flang/lib/Semantics/resolve-directives.cpp:1436-1440
+ if (auto *prev{name ? GetContext().scope.parent().FindSymbol(name->source)
+ : nullptr}) {
+ name->symbol = prev;
+ return nullptr;
+ }
----------------
Nit: Can ResolveName be used instead of the above 5 lines?
================
Comment at: flang/lib/Semantics/resolve-directives.cpp:1442
+
+ if (auto *ompSymbol{
+ name ? GetContext().scope.FindSymbol(name->source) : nullptr}) {
----------------
Nit: Add a TODO above to check whether the following code needs to be in ResolveOmpName as well.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91159/new/
https://reviews.llvm.org/D91159
More information about the llvm-commits
mailing list