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 c,cpp,h --
clang/include/clang/Parse/Parser.h clang/include/clang/Sema/DeclSpec.h
clang/include/clang/Sema/ParsedAttr.h clang/lib/Parse/ParseDecl.cpp
clang/lib/Parse/ParseDeclCXX.cpp clang/lib/Parse/ParseExprCXX.cpp
clang/lib/Parse/ParseObjc.cpp clang/lib/Parse/ParseStmt.cpp
clang/lib/Parse/ParseTemplate.cpp clang/lib/Parse/Parser.cpp
clang/lib/Sema/DeclSpec.cpp clang/lib/Sema/ParsedAttr.cpp
clang/lib/Sema/SemaDecl.cpp clang/test/Sema/internal_linkage.c
``````````
: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/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index a6dd47ba8..a5a8f1603 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -1934,7 +1934,8 @@ Parser::DeclGroupPtrTy Parser::ParseSimpleDeclaration(
bool RequireSemi, ForRangeInit *FRI, SourceLocation *DeclSpecStart) {
// Need to retain these for diagnostics before we add them to the DeclSepc.
ParsedAttributesView OriginalDeclSpecAttrs;
- OriginalDeclSpecAttrs.addAllPrepend(DeclSpecAttrs.begin(),
DeclSpecAttrs.end());
+ OriginalDeclSpecAttrs.addAllPrepend(DeclSpecAttrs.begin(),
+ DeclSpecAttrs.end());
OriginalDeclSpecAttrs.Range = DeclSpecAttrs.Range;
// Parse the common declaration-specifiers piece.
diff --git a/clang/lib/Parse/ParseObjc.cpp b/clang/lib/Parse/ParseObjc.cpp
index c2dbc4edf..693483427 100644
--- a/clang/lib/Parse/ParseObjc.cpp
+++ b/clang/lib/Parse/ParseObjc.cpp
@@ -1066,7 +1066,7 @@ void Parser::ParseObjCTypeQualifierList(ObjCDeclSpec &DS,
/// Take all the decl attributes out of the given list and add
/// them to the given attribute set.
static void takeDeclAttributesAppend(ParsedAttributesView &attrs,
- ParsedAttributesView &from) {
+ ParsedAttributesView &from) {
for (auto &AL : llvm::reverse(from)) {
if (!AL.isUsedAsTypeAttr()) {
from.remove(&AL);
``````````
</details>
https://github.com/llvm/llvm-project/pull/162714
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits