cclioncode-navigation

How to disable function overloading detection in CLion for code navigation?


I'm using CLion to write mostly C code, in *.c files. How may I disable the IDE from interpreting the code as C++ for the code navigation feature, so that I can navigate symbols by name only, disregarding the parameters used in function calls? I'd like a more Vim-like experience, like when usings ctags and cscope, so that when I'm refactoring functions return types and parameters the IDE don't get lost.

Or should I just accept it's the way it works and rely more heavily on the various refactor wizards it provides?


Solution

  • As for this moment, ctags-like navigation doesn't exist in CLion: cscope/ctags navigation in Intellij Idea vim plugin.

    Your assumption that IDE is parsing the C code as C++ is either based on an error in the project's CMakeLists.txt or is simply wrong. It uses correct C syntax to navigate C code. Probably you mean C linking rules, where only function name matters.

    Yes, I advice that you try the built-in refactorings. They may choke on #ifdef-ed out code, because parsing ALL the variants of conditional compilation at the same time is hardly doable, but they are good. You might never look back.