[clang-tools-extra] [clangd] Support symbolTags for document symbol (PR #113669)

via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 29 20:52:28 PDT 2024


chouzz wrote:

@travkin79 

It's extracted from `semanticHighlihgting`. As I can see, it means a symbol with a `const` keyword, but to be honest, `const` and `read-only` mostly mean the same thing in C/C++.

> Having tags Constant and Read-only might be confusing. Maybe we should consider removing the Constant tag from LSP and only use Read-only. What do you think?

I agree. Also, I checked `semanticHighlihgting` feature, it uses `Read-only` modifier for `const` symbol, see https://github.com/llvm/llvm-project/blob/3de5dbb1110887d5127e815f3ca247a9d839ee85/clang-tools-extra/clangd/SemanticHighlighting.cpp#L1180

> Do you think, you could also set the declaration and definition tags?

OK, I will check how to add this.


https://github.com/llvm/llvm-project/pull/113669


More information about the cfe-commits mailing list