Renaming var causes curly bracket to be inserted

Simon Walter simon at explicit.technology
Fri May 22 03:24:34 BST 2020


Hi all,

First time posting to this list.

static void kdevelop_var_rename_bug(void)
{
    //It doesn't have this problem on my laptop which has the exact
    //same version and exact same OS version.
    char * * Row = NULL; //right click on "Row" and choose "Rename..."
    if (false) abort(); //an extra curly brace will appear on the next line
    Row = NULL;

    //It only happens when Row is right after an if that is not
contained in one
    //line
    if (false)
    {abort();}
    Row = NULL;

    if (false) {abort();}//This causes the bug too.
    Row = NULL;

    //Not if there no comment on the same line though!
    if (false) {abort();}
    Row = NULL;

    //This triggers the problem too.
    if (false) abort();
    Row = NULL;
}

In the above comment I mention another computer with the same version
that does not have this problem. The version is 5.0.3. I have downloaded
the 5.5.1 Appimage and tried that, and it still has this odd and painful
behavior.

Since it seems to be affected by something other than kdevelop, I am
hesitant to make a bug report. I thought I should reach out and ask for
help first.

Any ideas what would cause this? Does kdevelop use external libs to
perform the var rename?

Thank you,

Simon


More information about the KDevelop mailing list