With the code:
#define MACRO(A,B) foo(A); bar(B)
if(true) {
MACRO(A,B);
}
Astyle will remove the brackets around the macro call
if(true)
MACRO(A,B);
Fortunately I found a solution. If I place the ;
inside the macro, Astyle will understand it.
#define MACRO(A,B) foo(A); bar(B);
if(true) {
MACRO(A,B)
}
Is it a good solution, is it a bug with Astyle or is my misunderstanding?