@@ -687,19 +687,17 @@ bool SymbolCollector::handleDeclOccurrence(
687687 getRefContainer (ASTNode.Parent , Opts),
688688 isSpelled (FileLoc, *ND)});
689689 // Also collect indirect constructor calls like `make_unique`
690- if (auto *FD = llvm::dyn_cast<clang::FunctionDecl>(D)) {
691- if (FD->isTemplateInstantiation ()) {
692- if (auto *PT = FD->getPrimaryTemplate ();
693- PT && isLikelyForwardingFunction (PT)) {
694- ForwardingToConstructorVisitor Visitor{};
695- Visitor.TraverseStmt (FD->getBody ());
696- for (auto *Constructor : Visitor.Constructors ) {
697- addRef (getSymbolIDCached (Constructor),
698- SymbolRef{FileLoc, FID, Roles,
699- index::getSymbolInfo (ND).Kind ,
700- getRefContainer (ASTNode.Parent , Opts),
701- isSpelled (FileLoc, *ND)});
702- }
690+ if (auto *FD = llvm::dyn_cast<clang::FunctionDecl>(ASTNode.OrigD );
691+ FD && FD->isTemplateInstantiation ()) {
692+ if (auto *PT = FD->getPrimaryTemplate ();
693+ PT && isLikelyForwardingFunction (PT)) {
694+ ForwardingToConstructorVisitor Visitor{};
695+ Visitor.TraverseStmt (FD->getBody ());
696+ for (auto *Constructor : Visitor.Constructors ) {
697+ addRef (getSymbolIDCached (Constructor),
698+ SymbolRef{FileLoc, FID, Roles, index::getSymbolInfo (ND).Kind ,
699+ getRefContainer (ASTNode.Parent , Opts),
700+ isSpelled (FileLoc, *ND)});
703701 }
704702 }
705703 }
0 commit comments