A function-like macro is defined, where an inline function or template would check its arguments and evaluate them once

tx0/cpp:function-like-macrostrictnotemaintainability/designdepth fastmaintainability

What it finds

A macro with parameters substitutes text: arguments with side effects run as often as the parameter appears, operators bind to neighbouring tokens, and nothing is type-checked. inline functions, templates and constexpr functions do the same work under the rules of the language. Macros that paste or stringize tokens, which functions cannot do, are left alone.

From the rule's source, function_like_macro.rs.

Turn it on, off or suppress it

The rule runs from the strict tier up. To turn it on in a lower tier, give it a level in tx0.toml:

tx0.toml
[rules]
"tx0/cpp:function-like-macro" = "note"

To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:

// tx0: ignore[tx0/cpp:function-like-macro] reason="..."

tx0 explain tx0/cpp:function-like-macro shows the same in the terminal. Found a false positive? Report it.