[Mlir-commits] [mlir] [mlir] Do not set lastToken in AsmParser's resetToken function and add a unit test for AsmParsers's locations (PR #105529)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Sep 4 01:42:43 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 281d17840c35a1d80303bb6170c253fe2411f95f 15df89e2ad0fb0ef05a2886572dff3efe40b6b1b --extensions cpp,h -- mlir/lib/AsmParser/Parser.h mlir/unittests/Parser/ParserTest.cpp
``````````

</details>

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

``````````diff
diff --git a/mlir/lib/AsmParser/Parser.h b/mlir/lib/AsmParser/Parser.h
index 9cb809a79b..bf91831798 100644
--- a/mlir/lib/AsmParser/Parser.h
+++ b/mlir/lib/AsmParser/Parser.h
@@ -130,10 +130,10 @@ public:
     consumeToken();
   }
 
-  /// Reset the parser to the given lexer position. Resetting the parser/lexer 
-  /// position does not update 'state.lastToken'. 'state.lastToken' is the 
+  /// Reset the parser to the given lexer position. Resetting the parser/lexer
+  /// position does not update 'state.lastToken'. 'state.lastToken' is the
   /// last parsed token, and is used to provide the scope end location for
-  /// OperationDefinitions. To ensure the correctness of the end location, the  
+  /// OperationDefinitions. To ensure the correctness of the end location, the
   /// last consumed token of an OperationDefinition needs to be the last token
   /// belonging to it.
   void resetToken(const char *tokPos) {

``````````

</details>


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


More information about the Mlir-commits mailing list