Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-6320

Implement clang-tidy check to catch incorrect flags hierarchies

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.2.0
    • None
    • Mesosphere Sprint 49
    • 3

    Description

      Classes need to always use virtual inheritance when being derived from FlagsBase. Also, in order to compose such derived flags they should be inherited virtually again.

      Some examples:

      struct A : virtual FlagsBase {}; // OK
      struct B : FlagsBase {}; // ERROR
      struct C : A {}; // ERROR
      

      We should implement a clang-tidy checker to catch such wrong inheritance issues.

      Attachments

        Activity

          People

            bbannier Benjamin Bannier
            bbannier Benjamin Bannier
            Michael Park Michael Park
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: