nridge added inline comments.
================ Comment at: clang-tools-extra/clangd/HeuristicResolver.cpp:56 + if (const auto *DNT = T->getAs<DependentNameType>()) { + T = resolveDeclsToType(resolveDependentNameType(DNT)); + if (!T) ---------------- hokein wrote: > Is the `resolveDeclsToType` call necessary here? > The code path we're doing is `dependent-type => Decl* => Type => Decl*`, the > later two steps seems redundant, can we just use the Decl result from > `resolveDependentNameType()`? > > The Decl returned by `resolveDependentNameType()` in this testcase is a `TypeAliasDecl`. The function needs to return the `CXXRecordDecl` which is named by the target type of the alias. We could add logic to "desugar" the `TypeAliasDecl`, but it seems easier to reuse the existing logic that does the desugaring in type-land. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152645/new/ https://reviews.llvm.org/D152645 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits