Find out if a function is called within a C++ project?

后端 未结 8 542
失恋的感觉
失恋的感觉 2021-02-01 19:15

I\'m trying to remove functions that are not used from a C++ project. Over time it\'s become bloated and I\'m looking to remove functions that aren\'t used at all.

I ha

8条回答
  •  走了就别回头了
    2021-02-01 20:21

    Visual Studio can generate call graphs, showing 'called-by' for each function. Doxygen will do the same if you don't want to use Visual Studio.

    However both these methods will fail to detect a function called through a pointer, but that should normally be easy to check manually.

提交回复
热议问题