[llvm-branch-commits] [flang] [flang][OpenMP] Semantic checks for DOACROSS clause (PR #115397)

Tom Eccles via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Nov 8 06:56:05 PST 2024


================
@@ -933,11 +934,19 @@ void OmpStructureChecker::CheckDistLinear(
   }
 }
 
-void OmpStructureChecker::Leave(const parser::OpenMPLoopConstruct &) {
+void OmpStructureChecker::Leave(const parser::OpenMPLoopConstruct &x) {
   if (llvm::omp::allSimdSet.test(GetContext().directive)) {
     ExitDirectiveNest(SIMDNest);
   }
   dirContext_.pop_back();
+
+  assert(!loopStack_.empty() && "Expecting non-empty loop stack");
+  const LoopConstruct &top = loopStack_.back();
----------------
tblah wrote:

nit: I think this variable will be unused on non-assertion builds

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


More information about the llvm-branch-commits mailing list