[flang-commits] [flang] [flang] Fix unused variable (NFC) (PR #215566)
via flang-commits
flang-commits at lists.llvm.org
Tue Aug 11 06:44:22 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-flang-openmp
Author: Kelvin Li (kkwli)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/215566.diff
1 Files Affected:
- (modified) flang/lib/Semantics/check-omp-structure.cpp (+2-2)
``````````diff
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};
``````````
</details>
https://github.com/llvm/llvm-project/pull/215566
More information about the flang-commits
mailing list