https://github.com/bnbarham created https://github.com/llvm/llvm-project/pull/126151
Deduction guides have no name and we already skip adding occurrences to them for that reason. Also skip adding any relations to them. >From 9c81463e356483a33df5b898e277649bf0a521c3 Mon Sep 17 00:00:00 2001 From: Ben Barham <ben_bar...@apple.com> Date: Thu, 6 Feb 2025 15:17:56 -0800 Subject: [PATCH] [Index] Skip adding call relations to deduction guides Deduction guides have no name and we already skip adding occurrences to them for that reason. Also skip adding any relations to them. --- clang/lib/Index/IndexBody.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/clang/lib/Index/IndexBody.cpp b/clang/lib/Index/IndexBody.cpp index c18daf7faa74979..f1dc4d5831ce746 100644 --- a/clang/lib/Index/IndexBody.cpp +++ b/clang/lib/Index/IndexBody.cpp @@ -130,6 +130,9 @@ class BodyIndexer : public RecursiveASTVisitor<BodyIndexer> { void addCallRole(SymbolRoleSet &Roles, SmallVectorImpl<SymbolRelation> &Relations) { + if (isa<CXXDeductionGuideDecl>(ParentDC)) + return; + Roles |= (unsigned)SymbolRole::Call; if (auto *FD = dyn_cast<FunctionDecl>(ParentDC)) Relations.emplace_back((unsigned)SymbolRole::RelationCalledBy, FD); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits