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 cpp --
clang/lib/Format/TokenAnnotator.cpp clang/unittests/Format/FormatTest.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/lib/Format/TokenAnnotator.cpp
b/clang/lib/Format/TokenAnnotator.cpp
index 6f1ef8e03..810d9e68a 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -88,9 +88,9 @@ static bool isCppAttribute(bool IsCpp, const FormatToken
&Tok) {
if (!IsCpp || !Tok.startsSequence(tok::l_square, tok::l_square))
return false;
// The first square bracket is part of an ObjC array literal
-if (Tok.Previous && Tok.Previous->isOneOf(tok::at, tok::l_square))
-return false;
+ if (Tok.Previous && Tok.Previous->isOneOf(tok::at, tok::l_square))
return false;
+ return false;
const FormatToken *AttrTok = Tok.Next->Next;
if (!AttrTok)
return false;
``````````
</details>
https://github.com/llvm/llvm-project/pull/199103
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits