[flang-commits] [flang] [flang][OpenMP][Semantics] resolve objects in the flush arg list (PR #139522)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Mon May 12 09:08:46 PDT 2025
================
@@ -409,6 +409,19 @@ class OmpAttributeVisitor : DirectiveAttributeVisitor<llvm::omp::Directive> {
}
void Post(const parser::OpenMPDepobjConstruct &) { PopContext(); }
+ bool Pre(const parser::OpenMPFlushConstruct &x) {
+ PushContext(x.source, llvm::omp::Directive::OMPD_flush);
+ for (auto &arg : x.v.Arguments().v) {
+ if (auto *locator{std::get_if<parser::OmpLocator>(&arg.u)}) {
+ if (auto *object{std::get_if<parser::OmpObject>(&locator->u)}) {
+ ResolveOmpObject(*object, Symbol::Flag::OmpDependObject);
----------------
tblah wrote:
Yes it was a copy and paste error. Thanks for catching this.
I had assumed that given an object, the right way to resolve it was to call ResolveOmpObject. I have now changed to include only the relevant parts of the code inline.
https://github.com/llvm/llvm-project/pull/139522
More information about the flang-commits
mailing list