[Mlir-commits] [mlir] [mlir] add debug messages explaining failure reasons of isValidIntOrFloat (PR #69476)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Oct 18 08:45:08 PDT 2023
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 df3478e480b3b2e9fe125697b7931dc48b09e450 1de2c48ca88daa685929fd544d0ece80c81da4d5 -- mlir/lib/IR/BuiltinAttributes.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/IR/BuiltinAttributes.cpp b/mlir/lib/IR/BuiltinAttributes.cpp
index 4b18c8c34ae6..4f5ccb2c5c4a 100644
--- a/mlir/lib/IR/BuiltinAttributes.cpp
+++ b/mlir/lib/IR/BuiltinAttributes.cpp
@@ -1125,8 +1125,8 @@ static bool isValidIntOrFloat(Type type, int64_t dataEltSize, bool isInt,
auto intType = llvm::dyn_cast<IntegerType>(type);
if (!intType) {
LLVM_DEBUG(llvm::dbgs()
- << "expected integer type when isInt is true, but found "
- << type << "\n");
+ << "expected integer type when isInt is true, but found " << type
+ << "\n");
return false;
}
@@ -1136,9 +1136,8 @@ static bool isValidIntOrFloat(Type type, int64_t dataEltSize, bool isInt,
bool valid = intType.isSigned() == isSigned;
if (!valid)
- LLVM_DEBUG(llvm::dbgs()
- << "expected signedness " << isSigned << " to match type "
- << type << "\n");
+ LLVM_DEBUG(llvm::dbgs() << "expected signedness " << isSigned
+ << " to match type " << type << "\n");
return valid;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/69476
More information about the Mlir-commits
mailing list