cLion IDE doesn't find declaration of class if there is a forward declaration
已完成
(For some reason) the source code I am working with has a forward declaration
class Foo;
and later on a real declaration
class Foo { Foo(string foo_name); }
but the IDE doesn't find the real declaration.
请先登录再写评论。
Hi, Alan.
Sorry for the inconvenience. Could you please send us a code example?
Hi Anna - thanks for responding so quickly! I tried out a couple of simple test cases, and it seems cLion is finding the definition with no problems. So I have to dig deeper into the (very complicated) build. Sorry for the bother. - Alan
IDE find real declaration, but mark it as unused struct when inspect code (it's used)... I think it's wrong behaviour.
@Morp007, please provide a code snippet and specify the CLion version you use.
I am encountering the same issue. I can't provide a minimal example, but I can provide a reproducible one:
- Clone https://github.com/mixxxdj/mixxx/pull/2873/commits/a30ecaa0b324e99946a0d35b6071e727c30c4879
- Open src/recording/macromanager.h or src/mixxx.h
- Ctrl-Click on MacroManager - it will go to the forward declaration in mixxx.h instead of macromanager.cpp/macromanager.h