[flang-commits] [flang] [Flang][Semantics] Allow declare target to be used on functions external to the declare targets scope (PR #122546)

Krzysztof Parzyszek via flang-commits flang-commits at lists.llvm.org
Fri Jan 17 05:40:13 PST 2025


================
@@ -1524,7 +1527,46 @@ class OmpVisitor : public virtual DeclarationVisitor {
     return true;
   }
   void Post(const parser::OpenMPThreadprivate &) { SkipImplicitTyping(false); }
-  bool Pre(const parser::OpenMPDeclareTargetConstruct &) {
+  bool Pre(const parser::OpenMPDeclareTargetConstruct &x) {
+    const auto &spec{std::get<parser::OmpDeclareTargetSpecifier>(x.t)};
+    auto populateDeclareTargetNames =
----------------
kparzysz wrote:

Please use brace initialization in the FE.

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


More information about the flang-commits mailing list