[flang-commits] [flang] Fix warning by removing unused variable (PR #81604)
Mats Petersson via flang-commits
flang-commits at lists.llvm.org
Tue Feb 13 05:36:54 PST 2024
https://github.com/Leporacanthicus created https://github.com/llvm/llvm-project/pull/81604
Apparently, some compilers [correctly] warn that the variable that was created prior to this change is unused.
This reemoves the variable.
>From 45292480f4ad44fb9578b1e6c0f8a9fd155018b4 Mon Sep 17 00:00:00 2001
From: Mats Petersson <mats.petersson at arm.com>
Date: Tue, 13 Feb 2024 12:05:51 +0000
Subject: [PATCH] Fix warning by removing unused variable
---
flang/lib/Semantics/canonicalize-omp.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/flang/lib/Semantics/canonicalize-omp.cpp b/flang/lib/Semantics/canonicalize-omp.cpp
index 01adcf53728424..0481b3d41f501d 100644
--- a/flang/lib/Semantics/canonicalize-omp.cpp
+++ b/flang/lib/Semantics/canonicalize-omp.cpp
@@ -92,7 +92,7 @@ class CanonicalizationOfOmp {
nextIt = it;
while (++nextIt != block.end()) {
// Ignore compiler directives.
- if (auto *directive{GetConstructIf<parser::CompilerDirective>(*nextIt)})
+ if (GetConstructIf<parser::CompilerDirective>(*nextIt))
continue;
if (auto *doCons{GetConstructIf<parser::DoConstruct>(*nextIt)}) {
More information about the flang-commits
mailing list