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/clangd/FindTarget.cpp 
clang-tools-extra/clangd/SemanticHighlighting.cpp 
clang-tools-extra/clangd/SemanticHighlighting.h clang/include/clang/AST/Decl.h 
clang/include/clang/Parse/Parser.h clang/include/clang/Sema/Sema.h 
clang/lib/AST/Decl.cpp clang/lib/Parse/ParseDeclCXX.cpp 
clang/lib/Parse/Parser.cpp clang/lib/Sema/SemaLookup.cpp 
clang/lib/Sema/SemaModule.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/include/clang/AST/Decl.h b/clang/include/clang/AST/Decl.h
index 1146e3b99..edd99419a 100644
--- a/clang/include/clang/AST/Decl.h
+++ b/clang/include/clang/AST/Decl.h
@@ -5180,10 +5180,10 @@ private:
   SourceLocation RBraceLoc;
   NestedNameSpecifierLoc QualifierLoc;
 
-  ExportDecl(DeclContext *DC, SourceLocation ExportLoc, NestedNameSpecifierLoc 
QualifierLoc, DeclarationName Id)
+  ExportDecl(DeclContext *DC, SourceLocation ExportLoc,
+             NestedNameSpecifierLoc QualifierLoc, DeclarationName Id)
       : NamedDecl(Export, DC, ExportLoc, Id), DeclContext(Export),
-        RBraceLoc(SourceLocation()),
-        QualifierLoc(QualifierLoc){}
+        RBraceLoc(SourceLocation()), QualifierLoc(QualifierLoc) {}
 
 public:
   static ExportDecl *Create(ASTContext &C, DeclContext *DC,
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index d23004bb3..7b8dea43b 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/lib/AST/Decl.cpp
@@ -6088,13 +6088,13 @@ void ExportDecl::anchor() {}
 ExportDecl *ExportDecl::Create(ASTContext &C, DeclContext *DC,
                                SourceLocation ExportLoc,
                                NestedNameSpecifierLoc QualifierLoc,
-                               DeclarationName Id
-                               ) {
+                               DeclarationName Id) {
   return new (C, DC) ExportDecl(DC, ExportLoc, QualifierLoc, Id);
 }
 
 ExportDecl *ExportDecl::CreateDeserialized(ASTContext &C, GlobalDeclID ID) {
-  return new (C, ID) ExportDecl(nullptr, SourceLocation(), 
NestedNameSpecifierLoc(), DeclarationName());
+  return new (C, ID) ExportDecl(nullptr, SourceLocation(),
+                                NestedNameSpecifierLoc(), DeclarationName());
 }
 
 bool clang::IsArmStreamingFunction(const FunctionDecl *FD,
diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp
index 3a61f0204..f25606e66 100644
--- a/clang/lib/Parse/Parser.cpp
+++ b/clang/lib/Parse/Parser.cpp
@@ -640,12 +640,11 @@ bool Parser::ParseTopLevelDecl(DeclGroupPtrTy &Result,
     return false;
 
   case tok::kw_import:
-  import_decl:
-    {
-      Decl *ImportDecl = ParseModuleImport(SourceLocation(), ImportState);
-      Result = Actions.ConvertDeclToDeclGroup(ImportDecl);
-      return false;
-    }
+  import_decl: {
+    Decl *ImportDecl = ParseModuleImport(SourceLocation(), ImportState);
+    Result = Actions.ConvertDeclToDeclGroup(ImportDecl);
+    return false;
+  }
 
   case tok::annot_module_include: {
     auto Loc = Tok.getLocation();
@@ -655,8 +654,8 @@ bool Parser::ParseTopLevelDecl(DeclGroupPtrTy &Result,
     if (!getLangOpts().CPlusPlusModules || !Mod->isHeaderUnit())
       Actions.ActOnAnnotModuleInclude(&SS, Loc, Tok.getIdentifierInfo(), Mod);
     else {
-      DeclResult Import =
-          Actions.ActOnModuleImport(&SS, Loc, SourceLocation(), Loc, Mod, 
Tok.getIdentifierInfo());
+      DeclResult Import = Actions.ActOnModuleImport(
+          &SS, Loc, SourceLocation(), Loc, Mod, Tok.getIdentifierInfo());
       Decl *ImportDecl = Import.isInvalid() ? nullptr : Import.get();
       Result = Actions.ConvertDeclToDeclGroup(ImportDecl);
     }
@@ -2530,8 +2529,9 @@ Decl *Parser::ParseModuleImport(SourceLocation AtLoc,
     Import = Actions.ActOnModuleImport(&SS, StartLoc, ExportLoc, ImportLoc,
                                        HeaderUnit, Tok.getIdentifierInfo());
   else if (!Path.empty())
-    Import = Actions.ActOnModuleImport(&SS, StartLoc, ExportLoc, ImportLoc,
-                                       Path, Tok.getIdentifierInfo(), 
IsPartition);
+    Import =
+        Actions.ActOnModuleImport(&SS, StartLoc, ExportLoc, ImportLoc, Path,
+                                  Tok.getIdentifierInfo(), IsPartition);
   if (Import.isInvalid())
     return nullptr;
 

``````````

</details>


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

Reply via email to