Cevelop / Issues

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

constificator drops curly braces when adding const to noexcept member function #65

Closed PeterSommerlad closed 6 years ago

PeterSommerlad commented 6 years ago

Expected Behavior

given:

struct on_exit_policy
{
    bool execute_{ true };

    void release() noexcept
    {
        execute_ = false;
    }

    bool should_execute() noexcept // const suggested
    {
        return execute_;
    }
};

adding const should leave code in compilable shape.

Actual Behavior

struct on_exit_policy
{
    bool execute_{ true };

    void release() noexcept
    {
        execute_ = false;
    }

    bool should_execute() const noexcept
        return execute_;
    }
};

Cevelop Version, Operating System and Compiler

constificator 1.8.0.201711101523

Darnor commented 6 years ago

Issue with CDT Parser. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=527396.