Cevelop / Issues

The official issue tracker for Cevelop.
9 stars 1 forks source link

Constructor Order of Initialization Gives False Warning #38

Closed rmerriam closed 6 years ago

rmerriam commented 7 years ago

The following class and constructor receive the warning about initializing members should be in the proper order:

class test {
public:
    test(const uint16_t x, const uint16_t y) :
        x { x }, y { x } {
    }

    uint16_t z { };
    uint16_t x;
    uint16_t y;
};

The actual order is okay but the detector doesn't like 'z' being initialized at its declaration. Only with 'z' in the constructor initialization list is the detector satisfied.

tcorbat commented 7 years ago

Confirmed, that's a bug in the core guideline checker for C47.

Darnor commented 6 years ago

This is resolved in recent versions of the GSLAtor plug-in.