[flang-commits] [flang] Fix warning by removing unused variable (PR #81604)
via flang-commits
flang-commits at lists.llvm.org
Tue Feb 13 05:37:27 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-flang-semantics
Author: Mats Petersson (Leporacanthicus)
<details>
<summary>Changes</summary>
Apparently, some compilers [correctly] warn that the variable that was created prior to this change is unused.
This reemoves the variable.
---
Full diff: https://github.com/llvm/llvm-project/pull/81604.diff
1 Files Affected:
- (modified) flang/lib/Semantics/canonicalize-omp.cpp (+1-1)
``````````diff
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)}) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/81604
More information about the flang-commits
mailing list