[flang-commits] [flang] d1f510c - Fix warning by removing unused variable (#81604)

via flang-commits flang-commits at lists.llvm.org
Tue Feb 13 06:32:30 PST 2024


Author: Mats Petersson
Date: 2024-02-13T14:32:26Z
New Revision: d1f510cca8e966bd1742bf17256bfec99dcdf229

URL: https://github.com/llvm/llvm-project/commit/d1f510cca8e966bd1742bf17256bfec99dcdf229
DIFF: https://github.com/llvm/llvm-project/commit/d1f510cca8e966bd1742bf17256bfec99dcdf229.diff

LOG: Fix warning by removing unused variable (#81604)

Apparently, some compilers [correctly] warn that the variable that was
created prior to this change is unused.

This reemoves the variable.

Added: 
    

Modified: 
    flang/lib/Semantics/canonicalize-omp.cpp

Removed: 
    


################################################################################
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