Skip to main content

IAR Embedded Workbench for RX 5.20

MISRAC++2023-6.4.2 (C++ only)

In this section:
Synopsis

(Required) Derived classes shall not conceal functions that are inherited from their bases.

Enabled by default

Yes

Severity/Certainty

Medium/Medium

mediummedium.png
Full description

Found a concealing function in derived class.

Coding standards

This check does not correspond to any coding standard rules.

Code examples

The following code example fails the check and will give a warning:

struct A {
  void f();
};

struct B: public A {
  void f();
};

The following code example passes the check and will not give a warning about this issue:

struct A {
  virtual void f();
};

struct B: public A {
  void f() override;
};