================ @@ -673,9 +674,16 @@ bool SymbolCollector::handleDeclOccurrence( // refs, because the indexing code only populates relations for specific // occurrences. For example, RelationBaseOf is only populated for the // occurrence inside the base-specifier. - processRelations(*ND, ID, Relations); + processRelations(ID, *ASTNode.OrigD, Relations); bool CollectRef = static_cast<bool>(Opts.RefFilter & toRefKind(Roles)); + // For now we only want the bare minimum of information for a class + // instantiation such that we have symbols for the `BaseOf` relation. + if (const auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(D); + CTSD && CTSD->hasDefinition() && !CTSD->bases().empty() && ---------------- timon-ul wrote:
These conditions mirror what has to be fullfilled in `IndexDecl.cpp` for an implicit instantiation to be indexed. The `hasDefinition()` check only exists because I think it is mandatory before you can check for `bases()`, it has been a while so I am not 100% anymore on this. Honestly yeah we should probably drop these 2 conditions here, my thought was I want to only exclude those for now, but thinking about it again I do not think it makes much sense, either we want to collect references for all instantiations or for none, no weird in between. https://github.com/llvm/llvm-project/pull/177273 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
