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

后端 未结 8 549
失恋的感觉
失恋的感觉 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:06

    The excellent (and free) Source Monitor static analysis tool, from http://www.campwoodsw.com/ can give you counts of the number of calls to a method, which I think is what you want.

    Edit: Seems to be my evening for screwing up. The calls metric does not in fact do what I thought it did. Still, SM is an excellent tool so I hope that bringing it to people's attention has done some good!

提交回复
热议问题