1.. title:: clang-tidy - fuchsia-multiple-inheritance 2 3fuchsia-multiple-inheritance 4============================ 5 6Warns if a class inherits from multiple classes that are not pure virtual. 7 8For example, declaring a class that inherits from multiple concrete classes is 9disallowed: 10 11.. code-block:: c++ 12 13 class Base_A { 14 public: 15 virtual int foo() { return 0; } 16 }; 17 18 class Base_B { 19 public: 20 virtual int bar() { return 0; } 21 }; 22 23 // Warning 24 class Bad_Child1 : public Base_A, Base_B {}; 25 26A class that inherits from a pure virtual is allowed: 27 28.. code-block:: c++ 29 30 class Interface_A { 31 public: 32 virtual int foo() = 0; 33 }; 34 35 class Interface_B { 36 public: 37 virtual int bar() = 0; 38 }; 39 40 // No warning 41 class Good_Child1 : public Interface_A, Interface_B { 42 virtual int foo() override { return 0; } 43 virtual int bar() override { return 0; } 44 }; 45 46See the features disallowed in Fuchsia at https://fuchsia.googlesource.com/zircon/+/master/docs/cxx.md 47