5 ms·
In C++, preprocessor and template magic in dependencies tends to break such IDE convenience features as "go to definition" or "find all references".
by yakubin 5y ago
In C++, preprocessor and template magic in dependencies tends to break such IDE convenience features as "go to definition" or "find all references".
- kccqzy 5y agoThis almost doesn't happen when your tools are good. At Google the Kythe tool (https://kythe.io https://kythe.io) gracefully deals with templates, macros, and much more. Both "go to definition" and "find references" just work with 99.9% of C++ code, including within complicated macros and templates. (The one and only case I've ever found it doesn't work is to find references to a function that's only called via ADL in a widely used template that's instantiated with thousands of different types.)
- Groxx 5y agotbh I've had dramatically worse type-aware IDE features with Go than almost any other mainstream language. gopls routinely misses trivial things in the same file. Goland does substantially better, but it still has major problems gathering a complete call hierarchy, and basic things like moving a file to a different package (with no compilation issues, just import rewrites) still don't work reliably.