@@ -806,7 +806,9 @@ std::vector<LocatedSymbol> locateSymbolAt(ParsedAST &AST, Position Pos,
806806 if (Tok.kind () == tok::kw_auto || Tok.kind () == tok::kw_decltype) {
807807 // go-to-definition on auto should find the definition of the deduced
808808 // type, if possible
809- if (auto Deduced = getDeducedType (AST.getASTContext (), Tok.location ())) {
809+ if (auto Deduced =
810+ getDeducedType (AST.getASTContext (), AST.getHeuristicResolver (),
811+ Tok.location ())) {
810812 auto LocSym = locateSymbolForType (AST, *Deduced, Index);
811813 if (!LocSym.empty ())
812814 return LocSym;
@@ -1965,7 +1967,7 @@ std::vector<const CXXRecordDecl *> findRecordTypeAt(ParsedAST &AST,
19651967
19661968// Return the type most associated with an AST node.
19671969// This isn't precisely defined: we want "go to type" to do something useful.
1968- static QualType typeForNode (const ASTContext &Ctx,
1970+ static QualType typeForNode (const ASTContext &Ctx, const HeuristicResolver *H,
19691971 const SelectionTree::Node *N) {
19701972 // If we're looking at a namespace qualifier, walk up to what it's qualifying.
19711973 // (If we're pointing at a *class* inside a NNS, N will be a TypeLoc).
@@ -1978,7 +1980,7 @@ static QualType typeForNode(const ASTContext &Ctx,
19781980 if (const TypeLoc *TL = N->ASTNode .get <TypeLoc>()) {
19791981 if (llvm::isa<DeducedType>(TL->getTypePtr ()))
19801982 if (auto Deduced = getDeducedType (
1981- N->getDeclContext ().getParentASTContext (), TL->getBeginLoc ()))
1983+ N->getDeclContext ().getParentASTContext (), H, TL->getBeginLoc ()))
19821984 return *Deduced;
19831985 // Exception: an alias => underlying type.
19841986 if (llvm::isa<TypedefType>(TL->getTypePtr ()))
@@ -2161,7 +2163,8 @@ std::vector<LocatedSymbol> findType(ParsedAST &AST, Position Pos,
21612163 // information about the type you may have not known before
21622164 // (since unique_ptr<unique_ptr<T>> != unique_ptr<T>).
21632165 for (const QualType &Type : unwrapFindType (
2164- typeForNode (AST.getASTContext (), N), AST.getHeuristicResolver ()))
2166+ typeForNode (AST.getASTContext (), AST.getHeuristicResolver (), N),
2167+ AST.getHeuristicResolver ()))
21652168 llvm::copy (locateSymbolForType (AST, Type, Index),
21662169 std::back_inserter (LocatedSymbols));
21672170
0 commit comments