[llvm] Add [[maybe_unused]] to a variable used only in assert in VPlan.h (PR #124173)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 23 10:42:26 PST 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 6d5697f7cb4e933d2f176c46b7ac05a9cbaeb8b6 cb616f8d010142ec3b115e089e90345dcb943aa0 --extensions h -- llvm/lib/Transforms/Vectorize/VPlan.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h
index 3dd9c139d8..16c64f32ab 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -2461,7 +2461,8 @@ public:
       : VPSingleDefRecipe(VPDef::VPPartialReductionSC,
                           ArrayRef<VPValue *>({Op0, Op1}), ReductionInst),
         Opcode(Opcode) {
-    [[maybe_unused]] auto *AccumulatorRecipe = getOperand(1)->getDefiningRecipe();
+    [[maybe_unused]] auto *AccumulatorRecipe =
+        getOperand(1)->getDefiningRecipe();
     assert((isa<VPReductionPHIRecipe>(AccumulatorRecipe) ||
             isa<VPPartialReductionRecipe>(AccumulatorRecipe)) &&
            "Unexpected operand order for partial reduction recipe");

``````````

</details>


https://github.com/llvm/llvm-project/pull/124173


More information about the llvm-commits mailing list