Miscellaneous-NoDiamondInheritanceΒΆ
Do not introduce a non-virtual diamond inheritance
Required inputs: IR
Avoid diamond inheritance when possible. If the derived class is intended to have multiple copies of the base class, prefer composition over inheritance. If the derived class should have only one copy of the base class, use virtual inheritance.
Possible Messages
Key |
Text |
Severity |
Disabled |
|---|---|---|---|
nonvirtual_diamond_inheritance |
Use of non-virtual diamond inheritance. |
None |
False |
Options
This rule shares the following common options: exclude_in_macros, exclude_messages_in_system_headers, excludes, extend_exclude_to_macro_invocations, includes, justification_checker, languages, post_processing, provider, report_at, severity
The following places define options that affect this rule: Stylechecks, Analysis-GlobalOptions
This rule has no individual options.