The check doesn't trigger for functions returning void. The new options
is added to allow to have a complete homogeneous code.
Hi! I am the original author of this check. I very much welcome your contribution! Thank you for the effort!
I am not a clang tools maintainer though, so you will need someone else to review and approve this change set.
I would intuitively check the cheaper condition first to benefit form short-circuit evaluation.
I picked up the habit to word conditions/options in a positive manner. So I would rather name the option RewriteVoidReturnType instead of IgnoreVoidReturnType and use the inverted Booleans throughout the code. The reason is that my brain parses e.g. if (!RewriteVoidReturnType) easierly than if(!IgnoreVoidReturnType) because of the double negation.
Feel free to debate me here. This is not a strong opinion.
The default behaviour of this check should be transform void return types as that's how it has been since the check was first created. Adding an option which defaults to changing this behaviour would be harmful to current users of this check.
There's no reason this should be accessible globally.
Please change this back to IgnoreVoidReturnType or maybe even IgnoreVoid, A lot of checks use Ignore options to help restrict what the check will report on, so we should follow that convention.