[flang-commits] [flang] [flang] Fix unused variable (NFC) (PR #215566)
Kelvin Li via flang-commits
flang-commits at lists.llvm.org
Tue Aug 11 06:43:33 PDT 2026
https://github.com/kkwli created https://github.com/llvm/llvm-project/pull/215566
None
>From d7393959a4f4bec11303879bb337611072bda651 Mon Sep 17 00:00:00 2001
From: Kelvin Li <kli at ca.ibm.com>
Date: Tue, 11 Aug 2026 09:41:35 -0400
Subject: [PATCH] [flang] Fix unused variable (NFC)
---
flang/lib/Semantics/check-omp-structure.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/flang/lib/Semantics/check-omp-structure.cpp b/flang/lib/Semantics/check-omp-structure.cpp
index 7bd5f1720fb3c..d33cb21d548f6 100644
--- a/flang/lib/Semantics/check-omp-structure.cpp
+++ b/flang/lib/Semantics/check-omp-structure.cpp
@@ -5303,7 +5303,6 @@ void OmpStructureChecker::CheckStructureComponent(
void OmpStructureChecker::Enter(
const parser::OmpClause::UpdateDependObjects &x) {
- llvm::omp::Directive dir{GetContext().directive};
unsigned version{context_.langOptions().OpenMPVersion};
auto *depType = std::get_if<parser::OmpDependenceType>(&x.v.u);
@@ -5320,7 +5319,8 @@ void OmpStructureChecker::Enter(
// as dependence-type.
// [5.2:322:3]
// task-dependence-type must not be depobj.
- assert(dir == llvm::omp::OMPD_depobj && "Unexpected directive");
+ assert(GetContext().directive == llvm::omp::OMPD_depobj &&
+ "Unexpected directive");
if (version >= 51) {
bool invalidDep{false};
More information about the flang-commits
mailing list