[clang-tools-extra] [clangd] Fix typeHierarchy/supertypes when a base is an implicit instantiation (PR #220240)

via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 2 02:50:47 PDT 2026


timon-ul wrote:

With just glancing at the code: What happens if you have the following code example:

```
struct RootBase {};
struct OtherBase {};

template <typename T>
struct Mixin : T {};

struct Unrelated : Mixin <OtherBase> {};
struct Deri^ved : Mixin <RootBase> {};
``` 
will it surface `OtherBase` in this case? I think it will if my understanding is still correct (and I don't think that is what we want).

I think the PR linked solves the issue without running into this problem, the main issue of it is that it needs a follow up to also be able to recognize the hierarchy in the direction wished for in this PR (currently it only is able to surface the implentations and not the base of a class).

https://github.com/llvm/llvm-project/pull/220240


More information about the cfe-commits mailing list