[Mlir-commits] [mlir] [mlir][CAPI] Add MlirOpFoldResult type to C API (PR #187247)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Mar 19 00:50:06 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 cpp,h,c -- mlir/include/mlir-c/IR.h mlir/include/mlir/CAPI/IR.h mlir/include/mlir/IR/OpDefinition.h mlir/lib/CAPI/IR/IR.cpp mlir/test/CAPI/ir.c --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/IR/OpDefinition.h b/mlir/include/mlir/IR/OpDefinition.h
index 6f0b192a5..18e2f3d5e 100644
--- a/mlir/include/mlir/IR/OpDefinition.h
+++ b/mlir/include/mlir/IR/OpDefinition.h
@@ -286,8 +286,7 @@ public:
/// Construct an OpFoldResult from an opaque pointer.
static OpFoldResult getFromOpaquePointer(const void *ptr) {
- PointerUnion pu =
- PointerUnion::getFromOpaqueValue(const_cast<void *>(ptr));
+ PointerUnion pu = PointerUnion::getFromOpaqueValue(const_cast<void *>(ptr));
if (isa<Attribute>(pu))
return cast<Attribute>(pu);
return cast<Value>(pu);
``````````
</details>
https://github.com/llvm/llvm-project/pull/187247
More information about the Mlir-commits
mailing list