Point childof at tapps instead of abses when aliasing is on
Summary:
This is an experimental change that should improve
cross-references when aliasing is turned on.
Reviewers: shahms, #core_team
Subscribers: #core_team
@@ -1529,11 +1529,17 @@ MaybeFew<GraphObserver::NodeId> IndexerASTVisitor::BuildNodeIdForDeclContext(
void IndexerASTVisitor::AddChildOfEdgeToDeclContext(
const clang::Decl *Decl, const GraphObserver::NodeId DeclNode) {
if (const DeclContext *DC = Decl->getDeclContext()) {
+ if (FLAGS_experimental_alias_template_instantiations) {
+ if (auto ContextId = BuildNodeIdForRefToDeclContext(DC)) {
+ Observer.recordChildOfEdge(DeclNode, ContextId.primary());
+ }
+ } else {
if (auto ContextId = BuildNodeIdForDeclContext(DC)) {
Observer.recordChildOfEdge(DeclNode, ContextId.primary());
}
}
}
+}
bool IndexerASTVisitor::VisitUnaryExprOrTypeTraitExpr(
const clang::UnaryExprOrTypeTraitExpr *E) {
