[clang-tools-extra] Symbol tags in SymbolInformation, WorkspaceSymbol, CallHierarchyItem and TypeHierarchyItem (PR #170103)
Dimitri Ratz via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 4 05:14:40 PDT 2026
================
@@ -153,6 +192,51 @@ bool isUniqueDefinition(const NamedDecl *Decl) {
isa<TemplateTemplateParmDecl>(Decl) || isa<ObjCCategoryDecl>(Decl) ||
isa<ObjCImplDecl>(Decl);
}
+
+// Filter symbol tags based on the presence of other tags and the kind of
+// symbol. This is needed to avoid redundant tags, e.g. Overrides implies
+// Virtual and Implements implies Overrides/Virtual.
+SymbolTags filterSymbolTags(SymbolTags ST) {
+ const SymbolTags VirtualMask = toSymbolTagBitmask(SymbolTag::Virtual);
+ const SymbolTags OverridesMask = toSymbolTagBitmask(SymbolTag::Overrides);
+ const SymbolTags ImplementsMask = toSymbolTagBitmask(SymbolTag::Implements);
+ const SymbolTags AbstractMask = toSymbolTagBitmask(SymbolTag::Abstract);
+ const SymbolTags FinalMask = toSymbolTagBitmask(SymbolTag::Final);
+
+ const SymbolTags RemoveVirtualAndOverrides = VirtualMask | OverridesMask;
----------------
ratzdi wrote:
done.
https://github.com/llvm/llvm-project/pull/170103
More information about the cfe-commits
mailing list