timon-ul wrote: Minor thing I noticed: This only works in one direction, if you look for the inverse type hierarchy you still get stuck on templates, so that is probably a follow up task. https://github.com/llvm/llvm-project/pull/177273