AStyle built from git 2025-03-21 converts this
void test(char*& str)
{
}
into this:
void test(char* & str)
{
}
Note the unwanted space before the '&', which shouldn't happen with "--align-pointer=type".
using
--style=allman
--suffix=none
--keep-one-line-blocks
--align-pointer=type
--min-conditional-indent=0
--max-continuation-indent=80
--indent-switches
--indent-col1-comments
--indent-preproc-block
--indent-preproc-define
--pad-header
--pad-comma
--formatted
--lineend=linux
--indent-preproc-block
--convert-tabs
--preserve-ws
There seems to be a more general issue:
Astyle keeps the following code unchanged:
expected:
I have pushed a fix for the first problem (pointer reference).
The second you can inmprove with
--squeeze-ws. But onlyintwill be recognized as a type, this is a limitation of the current parser.It works correctly now, thanks!
Hopfully this function can be restored again at some time. I've been relying on it a lot in Astyle 3.1 to normalize third-party codebases, especially all the function signatures.