You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Michael Park (JIRA)" <ji...@apache.org> on 2017/01/24 20:19:26 UTC
[jira] [Commented] (MESOS-6320) Implement clang-tidy check to catch
incorrect flags hierarchies
[ https://issues.apache.org/jira/browse/MESOS-6320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15836569#comment-15836569 ]
Michael Park commented on MESOS-6320:
-------------------------------------
{noformat}
commit d76f8d298b9f302c92ce4d0ff7ebed9e116a95a6
Author: Benjamin Bannier <bb...@gmail.com>
Date: Wed Dec 21 19:33:30 2016 +0100
[clang-tidy] Added Mesos check of custom Flags classes.
This change fixes MESOS-6320.
{noformat}
> Implement clang-tidy check to catch incorrect flags hierarchies
> ---------------------------------------------------------------
>
> Key: MESOS-6320
> URL: https://issues.apache.org/jira/browse/MESOS-6320
> Project: Mesos
> Issue Type: Bug
> Reporter: Benjamin Bannier
> Assignee: Benjamin Bannier
> Labels: clang-tidy, mesosphere
> Fix For: 1.2.0
>
>
> 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:
> {code}
> struct A : virtual FlagsBase {}; // OK
> struct B : FlagsBase {}; // ERROR
> struct C : A {}; // ERROR
> {code}
> We should implement a clang-tidy checker to catch such wrong inheritance issues.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)