You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

CLion 2020.2.3 Hierarchy View两大使用问题求助

Troubleshooting CLion 2020.2.3 Hierarchy View Issues in C++ Projects

Hey there, let's work through those two Hierarchy View headaches you're hitting with your C++ project in CLion 2020.2.3— I've run into similar quirks before, so here's what I've learned:

1. Navigating Multiple Usages in Method X's Hierarchy View

I get it, it's frustrating when clicking a method Y labeled "(3 usages)" only takes you to the first call site of X. The trick here is don't just click Y's name— expand it! In the Hierarchy View panel, you'll see a small arrow next to Y (it might be hidden until you hover). Click that arrow to reveal all three individual call entries for X inside Y. Each entry will correspond to a specific line of code, and clicking any of them will jump straight to that exact call location.

If you accidentally already jumped to the first call site, you can also use Alt + F7 to open the full Usages window for X. This window lists every single occurrence of X being called, including all three in Y, and each entry lets you jump directly to the line. Bonus: the Usages window has filtering options to narrow down results if you're dealing with a big codebase.

Double-clicking Y won't help here because CLion defaults to jumping to Y's definition when you double-click— that's why it wasn't working for you.

2. Hierarchy View Stopping at Constructors/Fields

This is a known limitation in CLion 2020.2.3's Call Hierarchy feature. Back in that version, the Hierarchy View didn't handle constructor calls or member field access well, so it would stop traversing the chain once it hit those elements. Eclipse's equivalent feature has better support for these cases, which makes the discrepancy even more annoying.

Here are your options:

Fixes/Workarounds:

  • Upgrade CLion: JetBrains fixed this gap in later versions (starting around 2021.3). If you can update to a newer release, the Hierarchy View will properly track constructor and field call chains just like Eclipse does.
  • Manual Chain Building (if you can't upgrade):
    • For constructors: Use Alt + F7 to find all places where the constructor is called, then run Ctrl + Alt + H on each of those call sites individually to build out the full hierarchy step-by-step.
    • Use "Show Usages in Context": When you run Alt + F7 for a constructor or field, right-click any usage entry and select "Show Call Hierarchy"— this will open a mini hierarchy for that specific call point, which you can use to piece together the full chain.
    • Combine with Structure Window: Open the Structure window (Alt + 7) to quickly locate constructors and fields in your classes, then pair it with the Usages window to trace who's accessing them.

内容的提问来源于stack exchange,提问作者BluesSolo

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.09 18:52:52