Cevelop / Issues

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

adding const& to catch clauses does not write const as set in preferences #74

Closed PeterSommerlad closed 5 years ago

PeterSommerlad commented 6 years ago

Expected Behavior

quick-fix for "Catching by reference is recommended" to add const& should add the const in the place as given by Code-style preferences setting for placing const keyword.

int main(int argc, char **argv) {
    try {
        throw S{};
    } catch (S s) { // should catch by const-reference!

    }
}

should result in

int main(int argc, char **argv) {
    try {
        throw S{};
    } catch (S const & s) { // should catch by const-reference!

    }
}

Actual Behavior

it seems that const is always placed left.

int main(int argc, char **argv) {
    try {
        throw S{};
    } catch (const S & s) { // should catch by const-reference!

    }
}

Cevelop Version, Operating System and Compiler

Version: 1.9.1-201802220948

fmorgner commented 6 years ago

This is an issue in Eclipse CDT and is reported and tracked upstream: https://bugs.eclipse.org/bugs/show_bug.cgi?id=532120

Darnor commented 5 years ago

Bug fixed upstream.