Re: Renaming var causes curly bracket to be inserted
Milian Wolff <[email protected]> Wed, 27 May 2020 09:39:42 +0200
| Newsgroups | gmane.comp.kde.users.kdevelop |
|---|---|
| Message-ID | <4186797.f60OLGDelg@milian-workstation> |
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
[email protected]
http://milianw.de
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEezawi1aUvUGg3A1+8zYW/HGdOX8FAl7OGT4ACgkQ8zYW/HGd OX8l+g/6AtfCcTyUXab+W1151UdT5tI6TxXj7XnrG9YioKzZjooFsmm23c7kGEqi XDiCOBD23JvZW+pOcJGaqjNJIC9plbSNKcz0prK98/kOC6jHjy1m6qiAXkgmQCQk pYQm6fFJ96SZdzJ8Fvy/72ZebTvFWj189Ih4wdOfT5ht73DnW9XWzoo76uYJAKyC +nQJtg8B9dYVK6rgQqZPZJmeiWpK4Dy6Rs3Hdp2NAzFb/9s644bTvYjkAzCJtN14 CMFO4uqX8LQSYws0eQlgKdG5OnMsUHubn1W4Ia5grI0MmVN5WcneoFSimf6O3VHK mP6AYOPJqlzOlqE9NXhxd4k+/3Y1IC1LPQC9Ytt/AC9gEzHFg2+WbgwhfzXoS2Gr hjTOCjVTk49KQZnsQDolTTDW+frlqA9vO39wYAqCVqPKj8QGGIqMFqm8VtQ6105J fE2cE+JbRVMlJJEum3Oh+CKiShShwGQojmaAjNxkFhxkNnK2aGaTnvUZ5PjapQT2 zEJpy8U+d33A10oNtbhdmqV3v4iHrbjs+wmtaFTajMrLDhN9I0Xe6WONWwA8pEvQ zatiV5ijO3d+l0WKHni1s7UNBHiScOQUSHK/zEKRKV1F6//+cWpKrhXSqFtZop4e 0e2LLxzfIlCD/n6fnocfRIf9jjvzuq87jg6O8wLK/z0KOEvgqpo= =Xadl -----END PGP SIGNATURE-----