[flang-commits] [flang] [flang][OpenMP] Use common utility functions to get affected nest depth (PR #191418)

Krzysztof Parzyszek via flang-commits flang-commits at lists.llvm.org
Fri Apr 10 13:17:31 PDT 2026


================
@@ -2081,7 +2062,8 @@ bool OmpAttributeVisitor::Pre(const parser::OpenMPLoopConstruct &x) {
     IssueNonConformanceWarning(beginName.v, beginName.source, version);
   }
   ClearDataSharingAttributeObjects();
-  SetContextAssociatedLoopLevel(GetNumAffectedLoopsFromLoopConstruct(x));
+  int64_t affectedDepth{GetNumAffectedLoopsFromLoopConstruct(x)};
+  SetContextAssociatedLoopLevel(affectedDepth);
----------------
kparzysz wrote:

`GetNumAffectedLoopsFromLoopConstruct` was called twice in an earlier version of this file.  It's a leftover from earlier changes.

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


More information about the flang-commits mailing list