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

后端 未结 8 543
失恋的感觉
失恋的感觉 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 19:56

    I'm pretty sure that mathematically, this can't be done in the general case. If you allow for recursion and function pointers (or first class functions) then you end up in a pretty simple reduction to the Halting Problem.

    Granted, this be a case that you never have to deal with, but you should know abut it...

提交回复
热议问题