[Mlir-commits] [mlir] [mlir] Make eraseFunctionArguments fail instead of crash on used args (PR #203367)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Jun 11 12:02:37 PDT 2026


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 origin/main HEAD --extensions h,cpp -- mlir/include/mlir/Interfaces/FunctionInterfaces.h mlir/lib/Interfaces/FunctionInterfaces.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

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

``````````diff
diff --git a/mlir/include/mlir/Interfaces/FunctionInterfaces.h b/mlir/include/mlir/Interfaces/FunctionInterfaces.h
index dd3d8605e..434e8c240 100644
--- a/mlir/include/mlir/Interfaces/FunctionInterfaces.h
+++ b/mlir/include/mlir/Interfaces/FunctionInterfaces.h
@@ -67,9 +67,9 @@ void insertFunctionResults(FunctionOpInterface op,
                            ArrayRef<DictionaryAttr> resultAttrs,
                            unsigned originalNumResults, Type newType);
 
-/// Erase the specified arguments and update the function type attribute. Returns
-/// failure if the function cannot be updated to have the new signature, e.g.
-/// because one of the erased arguments still has uses.
+/// Erase the specified arguments and update the function type attribute.
+/// Returns failure if the function cannot be updated to have the new signature,
+/// e.g. because one of the erased arguments still has uses.
 LogicalResult eraseFunctionArguments(FunctionOpInterface op,
                                      const BitVector &argIndices, Type newType);
 

``````````

</details>


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


More information about the Mlir-commits mailing list