c++ - How do I detect unused macro definitions & typedefs? -
it's easy list unused functions , variables linker feedback, how can detect unused macro definitions & typedefs? have browse code line line , git grep in whole project?
static analysis tools c , c++ programs may include check on unused preprocessor macros.
for instance see pc-lint.
another possibility go specific include files , use #ifdef 0 remove large sections of macros , review compiler errors using kind of divide , conquer algorithm. expect static analysis tool better approach source code size becomes large.
Comments
Post a Comment