AStyle version : 2.02.1 on Windows
default option.
-- 8< --
#define FOUR 4
class Foo
{
int bitfield_0 : 1;
int bitfield_1
:
2;
int bitfield_2 : FOUR;
};
-->8--
bitfield_0 : 1 is indented correctly.
bitfield_1, 2 is indented correctly but not :
bitfield_2 is not indented correctly.
Not sure if this is related but
typedef foo
{
__const int bar;
__int baz;
};
is indented correctly, but adding a bitfield specified ":<number>" on bar will indent wrong:</number>
typedef foo
{
const int bar:_2;
____int baz;
};
However, removing "const" also 'fixes' i:
typedef foo
{
__int bar:_2;
__int baz;
}
So the combination of "const"+"bitfield" seems to break things.
I am using "_" as space indicator. One space is inserted between ":" and "2" and the rest is indented two spaces extra.
Last edit: Soren Pingel Dalsgaard 2015-11-11
Fixed in 3.6.3.