[Mlir-commits] [mlir] [mlir][IR] Add `isFloat()` and clean code (PR #112897)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Oct 18 05:38:25 PDT 2024


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 3ef630ac339f31686290f9460a40eb2a9c9f5bd0 e20c7904fbed74183c882789c260d68612cdeba8 --extensions cpp,h -- mlir/include/mlir/IR/Types.h mlir/lib/IR/Types.cpp
``````````

</details>

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

``````````diff
diff --git a/mlir/lib/IR/Types.cpp b/mlir/lib/IR/Types.cpp
index d45d21af21..5914faa327 100644
--- a/mlir/lib/IR/Types.cpp
+++ b/mlir/lib/IR/Types.cpp
@@ -122,17 +122,11 @@ bool Type::isSignlessIntOrIndexOrFloat() const {
   return isSignlessIntOrIndex() || isFloat();
 }
 
-bool Type::isIntOrIndex() const {
-  return isInteger() || isIndex();
-}
+bool Type::isIntOrIndex() const { return isInteger() || isIndex(); }
 
-bool Type::isIntOrFloat() const {
-  return isInteger() || isFloat();
-}
+bool Type::isIntOrFloat() const { return isInteger() || isFloat(); }
 
-bool Type::isIntOrIndexOrFloat() const {
-  return isIntOrIndex() || isFloat();
-}
+bool Type::isIntOrIndexOrFloat() const { return isIntOrIndex() || isFloat(); }
 
 unsigned Type::getIntOrFloatBitWidth() const {
   assert(isIntOrFloat() && "only integers and floats have a bitwidth");

``````````

</details>


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


More information about the Mlir-commits mailing list