[Mlir-commits] [mlir] fix: custom parse functions using wrong return type (PR #120180)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Dec 16 20:39:09 PST 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 2806705c4bf69cbb1a8e482104efb9429bb50683 61579b91bdb8eb61603c668854be38ad49fd0d37 --extensions cpp -- mlir/lib/Dialect/GPU/IR/GPUDialect.cpp mlir/lib/Dialect/LLVMIR/IR/LLVMAttrs.cpp mlir/test/lib/Dialect/Test/TestTypes.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp b/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
index 6ec327402a..8e36638d6e 100644
--- a/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
+++ b/mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
@@ -2115,7 +2115,7 @@ LogicalResult ObjectAttr::verify(function_ref<InFlightDiagnostic()> emitError,
namespace {
ParseResult parseObject(AsmParser &odsParser, CompilationTarget &format,
- StringAttr &object) {
+ StringAttr &object) {
std::optional<CompilationTarget> formatResult;
StringRef enumKeyword;
auto loc = odsParser.getCurrentLocation();
diff --git a/mlir/lib/Dialect/LLVMIR/IR/LLVMAttrs.cpp b/mlir/lib/Dialect/LLVMIR/IR/LLVMAttrs.cpp
index 441c419379..c7ddc1b36f 100644
--- a/mlir/lib/Dialect/LLVMIR/IR/LLVMAttrs.cpp
+++ b/mlir/lib/Dialect/LLVMIR/IR/LLVMAttrs.cpp
@@ -28,7 +28,7 @@ using namespace mlir::LLVM;
/// opcode. Some DWARF expression operations have a specific number of operands
/// and may appear in a textual form.
static ParseResult parseExpressionArg(AsmParser &parser, uint64_t opcode,
- SmallVector<uint64_t> &args);
+ SmallVector<uint64_t> &args);
/// Prints DWARF expression arguments with respect to the specific DWARF
/// operation. Some operands are printed in their textual form.
@@ -145,7 +145,7 @@ DIExpressionAttr DIExpressionAttr::get(MLIRContext *context) {
}
ParseResult parseExpressionArg(AsmParser &parser, uint64_t opcode,
- SmallVector<uint64_t> &args) {
+ SmallVector<uint64_t> &args) {
auto operandParser = [&]() -> LogicalResult {
uint64_t operand = 0;
if (!args.empty() && opcode == llvm::dwarf::DW_OP_LLVM_convert) {
diff --git a/mlir/test/lib/Dialect/Test/TestTypes.cpp b/mlir/test/lib/Dialect/Test/TestTypes.cpp
index 92af5613b3..6e31bb71d0 100644
--- a/mlir/test/lib/Dialect/Test/TestTypes.cpp
+++ b/mlir/test/lib/Dialect/Test/TestTypes.cpp
@@ -97,7 +97,7 @@ static ParseResult parseCustomTypeA(AsmParser &parser, int &aResult) {
static void printCustomTypeA(AsmPrinter &printer, int a) { printer << a; }
static ParseResult parseCustomTypeB(AsmParser &parser, int a,
- std::optional<int> &bResult) {
+ std::optional<int> &bResult) {
if (a < 0)
return success();
for (int i : llvm::seq(0, a))
``````````
</details>
https://github.com/llvm/llvm-project/pull/120180
More information about the Mlir-commits
mailing list