================
@@ -1157,31 +1060,40 @@ getSemanticHighlightings(ParsedAST &AST, bool
IncludeInactiveRegionTokens) {
}
if (auto Mod = scopeModifier(Decl))
Tok.addModifier(*Mod);
- if (isConst(Decl))
- Tok.addModifier(HighlightingModifier::Readonly);
- if (isStatic(Decl))
- Tok.addModifier(HighlightingModifier::Static);
- if (isAbstract(Decl))
- Tok.addModifier(HighlightingModifier::Abstract);
- if (isVirtual(Decl))
- Tok.addModifier(HighlightingModifier::Virtual);
+
+ const auto SymbolTags = computeSymbolTags(*Decl);
+
+ static const llvm::DenseMap<SymbolTag, HighlightingModifier>
----------------
HighCommander4 wrote:
This code can be run concurrently from multiple threads, so I don't think we
can make it `static`.
But maybe we can make it `static thread_local`? We have [existing
uses](https://github.com/llvm/llvm-project/blob/d09fac453640fa1b174a82f707c4e5c063544b4b/clang-tools-extra/clangd/support/Context.cpp#L23)
of that in clangd code so it should work.
https://github.com/llvm/llvm-project/pull/167536
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits