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 origin/main HEAD --extensions h,cpp -- 
clang-tools-extra/clang-tidy/llvm/MlirUseAfterEraseCheck.cpp 
clang-tools-extra/clang-tidy/llvm/MlirUseAfterEraseCheck.h 
clang-tools-extra/test/clang-tidy/checkers/llvm/mlir-use-after-erase.cpp 
clang-tools-extra/clang-tidy/llvm/LLVMTidyModule.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

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

``````````diff
diff --git a/clang-tools-extra/clang-tidy/llvm/MlirUseAfterEraseCheck.cpp 
b/clang-tools-extra/clang-tidy/llvm/MlirUseAfterEraseCheck.cpp
index 6e5b6707c..5b805cef3 100644
--- a/clang-tools-extra/clang-tidy/llvm/MlirUseAfterEraseCheck.cpp
+++ b/clang-tools-extra/clang-tidy/llvm/MlirUseAfterEraseCheck.cpp
@@ -298,13 +298,13 @@ void MlirUseAfterEraseCheck::registerMatchers(MatchFinder 
*Finder) {
   // operation can be obtained via the overloaded `operator->` or via
   // `getOperation()`, both of which are declared in `mlir::OpState`.
   const auto OfOpState = ofClass(isSameOrDerivedFrom("::mlir::OpState"));
-  const auto UnwrapDerivedOp = expr(anyOf(
-      cxxMemberCallExpr(
-          on(ignoringParenImpCasts(Arg)),
-          callee(cxxMethodDecl(hasName("getOperation"), OfOpState))),
-      cxxOperatorCallExpr(hasOverloadedOperatorName("->"),
-                          hasArgument(0, ignoringParenImpCasts(Arg)),
-                          callee(cxxMethodDecl(OfOpState)))));
+  const auto UnwrapDerivedOp =
+      expr(anyOf(cxxMemberCallExpr(
+                     on(ignoringParenImpCasts(Arg)),
+                     callee(cxxMethodDecl(hasName("getOperation"), 
OfOpState))),
+                 cxxOperatorCallExpr(hasOverloadedOperatorName("->"),
+                                     hasArgument(0, 
ignoringParenImpCasts(Arg)),
+                                     callee(cxxMethodDecl(OfOpState)))));
 
   // A reference to the operation, either directly (a variable of type
   // `mlir::Operation *`) or through a derived op that is unwrapped to the

``````````

</details>


https://github.com/llvm/llvm-project/pull/210727
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to