Miscellaneous-NoEllipsis

Do not use variable arguments in functions

Required inputs: IR

This rule prevents the definition of C-style variadic functions. The use of strongly-typed means of parameter passing is preferable. In C++11, consider the use of parameter packs.

Calls to existing functions with variable arguments (such as printf) are allowed by this rule.

Rationale
Variable arguments are difficult to use correctly: if the number and types of the arguments passed by the caller does not match those expected by the callee, undefined behavior will occur.

Possible Messages

Key

Text

Severity

Disabled

ellipsis_parameter

Function must not have variable number of arguments.

None

False

Options

ignore_declarations

ignore_declarations : bool = True

Allow declarations of functions with variable number of arguments (e.g. for existing library functions); only report definitions.
 

ignore_inherited

ignore_inherited : bool = False

Do not report functions inheriting a variable number of arguments.