Erroneous formatting
Status: Beta
Brought to you by:
caiyu
if you have code like this:
void MyFunc(void)
// one or more comment lines
{
SomeCode();
}
after formatting with kr option you get this:
void MyFunc(void)
// one or more comment lines {
SomeCode();
}
which is obviously wrong!
That is a show stopper for me :(
Regards,
--
Francisco
Logged In: NO
I forgot to mention that this is not the case with Artistic Style 1.20.2
I'm using Astyleclipse 1.0.101.v200610192129
Logged In: NO
Note that you must have trailing spaces in the comment line.
Logged In: NO
another interesting test case:
------- cut here -----------
void MyFunc(struct t P)
// comment
{
AnyThing();
}
void MyFunc2(int P)
// comment
{
AnyThing();
}
------- cut here -----------
becomes
------- cut here -----------
void MyFunc(struct t P)
// comment {
AnyThing();
}
void MyFunc2(int P)
// comment
{
AnyThing();
}
------- cut here -----------
Myfunc is wrongly reformatted, Myfunc2 is not touched.
There are no trailling spaces in the comment line.