GeneralPurpose-MissingOverride¶
Override of functions is only permitted with keyword override
Required inputs: IR
override keyword
when overriding a method.
Bad code
class A
{
virtual void foo();
};
class B : public A
{
void foo(); // ERROR: missing override
};
Good code
class A
{
virtual void foo();
};
class B : public A
{
void foo() override;
};
See Also
Rule MisraC++-10.3.2Possible Messages
Key |
Text |
Severity |
Disabled |
|---|---|---|---|
missing_override |
Override of functions is only permitted with keyword override. |
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
allow_final¶
allow_final : bool = True
ignore_destructors¶
ignore_destructors : bool = True