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 40c45b6b43180221acb49f387e7d3158adf49e3e 
294b2ea315f1cbe1e794c2fb609455e9466e3b35 --extensions cpp,h -- 
clang-tools-extra/clangd/SemanticSelection.cpp 
clang-tools-extra/clangd/support/Bracket.cpp 
clang-tools-extra/clangd/support/Bracket.h 
clang-tools-extra/clangd/support/DirectiveTree.cpp 
clang-tools-extra/clangd/support/DirectiveTree.h 
clang-tools-extra/clangd/support/Lex.cpp 
clang-tools-extra/clangd/support/Token.cpp 
clang-tools-extra/clangd/support/Token.h
``````````

</details>

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

``````````diff
diff --git a/clang-tools-extra/clangd/SemanticSelection.cpp 
b/clang-tools-extra/clangd/SemanticSelection.cpp
index dd7116e619..5afac55fe0 100644
--- a/clang-tools-extra/clangd/SemanticSelection.cpp
+++ b/clang-tools-extra/clangd/SemanticSelection.cpp
@@ -11,6 +11,9 @@
 #include "Protocol.h"
 #include "Selection.h"
 #include "SourceCode.h"
+#include "support/Bracket.h"
+#include "support/DirectiveTree.h"
+#include "support/Token.h"
 #include "clang/AST/DeclBase.h"
 #include "clang/Basic/SourceLocation.h"
 #include "clang/Basic/SourceManager.h"
@@ -22,9 +25,6 @@
 #include "llvm/ADT/StringRef.h"
 #include "llvm/Support/Casting.h"
 #include "llvm/Support/Error.h"
-#include "support/Bracket.h"
-#include "support/DirectiveTree.h"
-#include "support/Token.h"
 #include <optional>
 #include <queue>
 #include <vector>
diff --git a/clang-tools-extra/clangd/support/DirectiveTree.cpp 
b/clang-tools-extra/clangd/support/DirectiveTree.cpp
index d25da11168..fe9fa34834 100644
--- a/clang-tools-extra/clangd/support/DirectiveTree.cpp
+++ b/clang-tools-extra/clangd/support/DirectiveTree.cpp
@@ -148,9 +148,9 @@ struct Dumper {
   llvm::raw_ostream &OS;
   unsigned Indent = 0;
 
-  Dumper(llvm::raw_ostream& OS) : OS(OS) {}
-  void operator()(const DirectiveTree& Tree) {
-    for (const auto& Chunk : Tree.Chunks)
+  Dumper(llvm::raw_ostream &OS) : OS(OS) {}
+  void operator()(const DirectiveTree &Tree) {
+    for (const auto &Chunk : Tree.Chunks)
       std::visit(*this, Chunk);
   }
   void operator()(const DirectiveTree::Conditional &Conditional) {
@@ -185,7 +185,7 @@ DirectiveTree DirectiveTree::parse(const TokenStream &Code) 
{
 // Define operator<< in terms of dump() functions above.
 #define OSTREAM_DUMP(Type)                                                     
\
   llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const Type &T) {        
\
-    Dumper{OS}(T);                                                         \
+    Dumper{OS}(T);                                                             
\
     return OS;                                                                 
\
   }
 OSTREAM_DUMP(DirectiveTree)

``````````

</details>


https://github.com/llvm/llvm-project/pull/109154
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to