Qt-Generic-TypedefCheck

Do not redefine a typedef

Required inputs: IR

This rule will warn when there are multiple definitions for a typedef. Usually, each typedef should be defined only a single time in a header file.

Note that if multiple definitions of a typedef exist, all those definitions must be equivalent to avoid violating the One Definition Rule (which causes undefined behavior).

Possible Messages

Key

Text

Severity

Disabled

differing_typedef_redefinition

Typedef redefined with different definition.

None

False

identical_typedef_redefinition

Typedef redefined.

advisory

False

Options

report_identical_redefinitions

report_identical_redefinitions : bool = False

Enables messages for identical redefinitions of a typedef.
 

report_template_instance_redefinitions

report_template_instance_redefinitions : bool = True

Enables messages for identical redefinitions of a typedef naming a template instance.