usually the compiler can help here, as it knows what was needed in the code and where the definition came from, including macros. Not sure there is an open-source tol for that though, if clang-tidy does not do it.
as it was said elsewhere, when there are several configurations at play, one needs to be careful.
combine these😎 use multiple cursors in an editable ripgrep result buffer. or in an editable dired buffer. use project.el or projectile, use radio buttons in org or define your own buttons in hyperbole.