Skip to content

Conversation

@ratzdi
Copy link

@ratzdi ratzdi commented Nov 11, 2025

Implementation of the issue clangd/clangd#2123 and continuation of #113669.

@github-actions
Copy link

Thank you for submitting a Pull Request (PR) to the LLVM Project!

This PR will be automatically labeled and the relevant teams will be notified.

If you wish to, you can add reviewers by using the "Reviewers" section on this page.

If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using @ followed by their GitHub username.

If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers.

If you have further questions, they may be answered by the LLVM GitHub User Guide.

You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums.

@ratzdi ratzdi force-pushed the users/ratzdi/symbol_tags branch from 60a56c9 to 64d5a36 Compare November 12, 2025 08:17
@github-actions
Copy link

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff origin/main HEAD --extensions h,cpp -- clang-tools-extra/clangd/AST.cpp clang-tools-extra/clangd/AST.h clang-tools-extra/clangd/FindSymbols.cpp clang-tools-extra/clangd/Protocol.cpp clang-tools-extra/clangd/Protocol.h clang-tools-extra/clangd/SemanticHighlighting.cpp --diff_from_common_commit

⚠️
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.
⚠️

View the diff from clang-format here.
diff --git a/clang-tools-extra/clangd/AST.h b/clang-tools-extra/clangd/AST.h
index ef1c95d26..3b4e6eb43 100644
--- a/clang-tools-extra/clangd/AST.h
+++ b/clang-tools-extra/clangd/AST.h
@@ -182,13 +182,16 @@ bool isConst(const Decl *D);
 // This is confusing, and maybe we should use another name, but because "static"
 // is a standard LSP modifier, having one with that name has advantages.
 bool isStatic(const Decl *D);
-// Indicates whether declaration D is abstract in cases where D is a struct or a class.
+// Indicates whether declaration D is abstract in cases where D is a struct or a
+// class.
 bool isAbstract(const Decl *D);
 // Indicates whether declaration D is virtual in cases where D is a method.
 bool isVirtual(const Decl *D);
-// Indicates whether declaration D is final in cases where D is a struct, class or method.
+// Indicates whether declaration D is final in cases where D is a struct, class
+// or method.
 bool isFinal(const Decl *D);
-// Indicates whether declaration D is a unique definition (as opposed to a declaration).
+// Indicates whether declaration D is a unique definition (as opposed to a
+// declaration).
 bool isUniqueDefinition(const NamedDecl *Decl);
 /// Returns a nested name specifier loc of \p ND if it was present in the
 /// source, e.g.
diff --git a/clang-tools-extra/clangd/Protocol.h b/clang-tools-extra/clangd/Protocol.h
index 607551f1b..f64555497 100644
--- a/clang-tools-extra/clangd/Protocol.h
+++ b/clang-tools-extra/clangd/Protocol.h
@@ -1104,13 +1104,13 @@ struct CodeAction {
 };
 llvm::json::Value toJSON(const CodeAction &);
 
-enum class SymbolTag { 
+enum class SymbolTag {
   Deprecated = 1,
   Private = 2,
   Package = 3,
   Protected = 4,
   Public = 5,
-  Internal= 6,
+  Internal = 6,
   File = 7,
   Static = 8,
   Abstract = 9,
@@ -1598,7 +1598,6 @@ struct ResolveTypeHierarchyItemParams {
 bool fromJSON(const llvm::json::Value &, ResolveTypeHierarchyItemParams &,
               llvm::json::Path);
 
-
 /// The parameter of a `textDocument/prepareCallHierarchy` request.
 struct CallHierarchyPrepareParams : public TextDocumentPositionParams {};
 

@ratzdi ratzdi marked this pull request as ready for review November 19, 2025 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants