Skip to content

Conversation

Leporacanthicus
Copy link
Contributor

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

This reemoves the variable.

@llvmbot llvmbot added flang Flang issues not falling into any other category flang:semantics labels Feb 13, 2024
@llvmbot
Copy link
Member

llvmbot commented Feb 13, 2024

@llvm/pr-subscribers-flang-semantics

Author: Mats Petersson (Leporacanthicus)

Changes

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 --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)}) {

Copy link
Contributor

@psteinfeld psteinfeld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick fix!

@Leporacanthicus Leporacanthicus merged commit d1f510c into llvm:main Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang:semantics flang Flang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants