================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits