A virtual function has default arguments, which come from the static type of the call and not from the override that runs
What it finds
Default arguments are filled in at compile time from the declaration the call sees: calling an override through a base pointer uses the base's defaults, even when the override declares others. Overloads or a non-virtual wrapper keep the defaults in one place.
From the rule's source, virtual_default_argument.rs.
Turn it on, off or suppress it
The rule runs from the recommended tier up. To turn it on in a lower tier, give it a level in tx0.toml:
[rules]
"tx0/cpp:virtual-default-argument" = "warning"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:virtual-default-argument] reason="..."tx0 explain tx0/cpp:virtual-default-argument shows the same in the terminal. Found a false positive? Report it.