Is a RETURN_ON_NULLPTR() macro bad code? (cpp:S960)

I do not remember exactly but years ago we decided that the “wont fix” feature does not work for us. We use NOSONAR instead. With all its drawbacks, e.g. hiding other issues.
“wont fix” did not work, the server always forgot the setting because we were on a different branch or something like this. We are running SQ code built for multiple arch/OS, and therefore use a LOT of branches. Not to mention the 10+ release branches that we have to manage. And also we use branches for PR-Analysis, because SQ cannot have multiple PR analysis (per arch/OS).
(There is this feature Multiple code variants analysis on SonarQube for C, C++ and Objective-C but its incomplete (no multiple hosts) and it is not LTS yet, so admins wont update…)

Obviously this code was just a example. There exist a lot of different macros. They are also used on size missmatches, or permission problems. With different error codes. There are more complicated checks and maybe even multiple return values in one macro. Of course, again, i could do:

if(const auto e = evaluate(sth); if OK != e) return e;

and make evaluate a static function but this is a lot more code duplication. This is actually what we do to have SQ analyze more code but again, duplicating this is bad practice isnt it? Therefore we created the macros.

abort or exceptions are not feasible, because we are in realtime code.

We do not use C++23 but I do not see how this would omit duplicate code. Can you provide an example?