[flang-commits] [flang] [Flang][OMP]Add support for DECLARE MAPPER parsing and semantics (PR #115160)

Akash Banerjee via flang-commits flang-commits at lists.llvm.org
Wed Nov 6 09:44:51 PST 2024


================
@@ -1605,6 +1609,26 @@ void OmpVisitor::Post(const parser::OpenMPBlockConstruct &x) {
   }
 }
 
+bool OmpVisitor::Pre(const parser::OpenMPDeclareMapperConstruct &x) {
+  AddOmpSourceRange(x.source);
+  BeginDeclTypeSpec();
+  PushScope(Scope::Kind::OtherConstruct, nullptr);
----------------
TIFitis wrote:

I think the `PushScope` should be after the `MapperName` decl, as we want the scope of the Mapper to be the _curScope_, but the `var` declared within the mapper should have a scope of just this mapper directive.

https://github.com/llvm/llvm-project/pull/115160


More information about the flang-commits mailing list