Consider changing MOCK_DECL and MOCK_IMPL so that ctags still finds mocked functions
Everytime someone creates new unittests for tor which mock a function with MOCK_IMPL
and MOCK_DECL
, it breaks looking up the real function with ctags/etags. I feel that this is really bad for enabling newcomers/outsiders to easily review our code (and thus this is discouraging me from mocking the functions that I need to in order to have 100% coverage for my code, because I feel I'm making tor's codebase uglier).
asn suggested that we fix it by figuring out which flags we need to give to ctags/etags to get it to work, and add whatever those flags are to the tags
Make target. I think it also should be possible to redefine those macros such that they rewrite the function signature whenever they see it, without actually needing to wrap around/mangle the real declaration and implementation.
Is this something that other people think is worth doing?