[Mlir-commits] [mlir] Add AsmParser::parseDecimalInteger. (PR #96255)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Jul 23 17:55:47 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 56535a090d91ff10a60c884bacbd314dcf9659db 318c01388367d54bbcebeede6fbf8ce99fbc80fc --extensions cpp,h -- mlir/include/mlir/IR/OpImplementation.h mlir/lib/AsmParser/AsmParserImpl.h mlir/lib/AsmParser/Parser.cpp mlir/lib/AsmParser/Parser.h mlir/test/lib/Dialect/Test/TestAttributes.cpp
``````````

</details>

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

``````````diff
diff --git a/mlir/include/mlir/IR/OpImplementation.h b/mlir/include/mlir/IR/OpImplementation.h
index ae412c7227..3d0064f703 100644
--- a/mlir/include/mlir/IR/OpImplementation.h
+++ b/mlir/include/mlir/IR/OpImplementation.h
@@ -728,7 +728,7 @@ public:
   virtual OptionalParseResult parseOptionalInteger(APInt &result) = 0;
   virtual OptionalParseResult parseOptionalDecimalInteger(APInt &result) = 0;
 
- private:
+private:
   template <typename IntT, typename ParseFn>
   OptionalParseResult parseOptionalIntegerAndCheck(IntT &result,
                                                    ParseFn &&parseFn) {
@@ -748,7 +748,7 @@ public:
     return success();
   }
 
- public:
+public:
   template <typename IntT>
   OptionalParseResult parseOptionalInteger(IntT &result) {
     return parseOptionalIntegerAndCheck(
diff --git a/mlir/test/lib/Dialect/Test/TestAttributes.cpp b/mlir/test/lib/Dialect/Test/TestAttributes.cpp
index 17ffa80ca1..e29fb5befe 100644
--- a/mlir/test/lib/Dialect/Test/TestAttributes.cpp
+++ b/mlir/test/lib/Dialect/Test/TestAttributes.cpp
@@ -66,9 +66,8 @@ void CompoundAAttr::print(AsmPrinter &printer) const {
 // CompoundAAttr
 //===----------------------------------------------------------------------===//
 
-
 Attribute TestDecimalShapeAttr::parse(AsmParser &parser, Type type) {
-  if (parser.parseLess()){
+  if (parser.parseLess()) {
     return Attribute();
   }
   SmallVector<int64_t> shape;

``````````

</details>


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


More information about the Mlir-commits mailing list