Renaming var causes curly bracket to be inserted
Milian Wolff
mail at milianw.de
Wed May 27 08:39:42 BST 2020
On Freitag, 22. Mai 2020 04:24:34 CEST Simon Walter wrote:
> 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?
What code formatter do you have configured? Do you have astyle/uncrustify/
clang-format or something like that?
Otherwise can you create a standalone file (the above probably is missing some
header includes), such that we can investigate that on our side too?
Thanks
--
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop/attachments/20200527/040b7cff/attachment.sig>
More information about the KDevelop
mailing list