Hacker News new | past | comments | ask | show | jobs | submit login

> IDEs understand preprocessor macros, so IDE features (jump2def, etc) work with this.

Do they? X macros often are used with token pasting (https://gcc.gnu.org/onlinedocs/cpp/Concatenation.html), as for example in (FTA)

  #define AST_BEGIN_SUBCLASSES(NAME) START_##NAME ,
Are modern IDEs/compiler toolchains smart enough to tell you that START_foo was created by an expansion of that macro?





Yes. I use this with VS2019 for generating enum names, and they interact fine with auto complete and go to definition.

any non-toy IDE can do that. Most IDEs use clang directly for parsing nowadays.



Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: