Skip to content

Conversation

@jurahul
Copy link
Contributor

@jurahul jurahul commented Oct 13, 2025

No description provided.

@jurahul jurahul requested a review from farzonl October 13, 2025 21:19
@jurahul jurahul marked this pull request as ready for review October 13, 2025 21:19
@llvmbot
Copy link
Member

llvmbot commented Oct 13, 2025

@llvm/pr-subscribers-llvm-transforms

Author: Rahul Joshi (jurahul)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/163267.diff

1 Files Affected:

  • (modified) llvm/lib/Transforms/Utils/CloneFunction.cpp (+1-1)
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp
index 3ce569f2d67bc..32924e7b69fdc 100644
--- a/llvm/lib/Transforms/Utils/CloneFunction.cpp
+++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp
@@ -826,7 +826,7 @@ void llvm::CloneAndPruneIntoFromInst(Function *NewFunc, const Function *OldFunc,
       BasicBlock::iterator I = NewBB->begin();
       for (; (PN = dyn_cast<PHINode>(I)); ++I) {
         for (const auto &[Pred, Count] : PredCount) {
-          for (unsigned _ : llvm::seq<unsigned>(Count))
+          for ([[maybe_unused]] unsigned _ : llvm::seq<unsigned>(Count))
             PN->removeIncomingValue(Pred, false);
         }
       }

@jurahul jurahul merged commit d9a6ed7 into llvm:main Oct 13, 2025
14 checks passed
@jurahul jurahul deleted the fix_clonefunction_warn branch October 13, 2025 23:46
@jmorse
Copy link
Member

jmorse commented Oct 14, 2025

FYI the "skip-precommit-approval" label is recommended for PRs created for quick-fixes, you get the CI feedback but other readers know it's not intended for general review.

akadutta pushed a commit to akadutta/llvm-project that referenced this pull request Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants