[clang-tools-extra] LSP 3.18 - Symbol Tags (PR #167536)
Nathan Ridge via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 17 23:17:07 PST 2026
================
@@ -1157,31 +1060,38 @@ getSemanticHighlightings(ParsedAST &AST, bool IncludeInactiveRegionTokens) {
}
if (auto Mod = scopeModifier(Decl))
Tok.addModifier(*Mod);
- if (isConst(Decl))
+
+ const auto SymbolTags = computeSymbolTags(*Decl, R.IsDecl);
+
+ if (SymbolTags & toSymbolTagBitmask(SymbolTag::Deprecated))
----------------
HighCommander4 wrote:
Could we do something like declare a map at the top level in `getSemanticHighlightins`:
```c++
llvm::DenseMap<SymbolTag, HighlightingModifier> TagToModifierMap {
{SymbolTag::Deprecated, HighlightingModifier::Deprecated},
// other mappings as appropriate
};
```
and then loop through the map here?
(`Declaration` can be omitted from the map and handled explicitly due to the extra logic discussed in the other comment.)
https://github.com/llvm/llvm-project/pull/167536
More information about the cfe-commits
mailing list