[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] CodeStyle - Indenting of Code Problem
|
For performance reasons auto-indenter cannot use AST and is not aware of macros. It's not surprising that it gets confused by
FUNC(void, MYMODULE_CODE) MyMod_Function(void)
-sergey
On Sun, Feb 27, 2011 at 12:46 PM, kesselhaus
<kesselhaus@xxxxxxx> wrote:
Hi folks,
I encounter a problem of indentation, but maybe there is an way to configure it and I did not find yet.
void foo(void)
{ /*<-- nicely indented */
/* do something */
}
AUTOSAR code, which uses some macros for compiler independent memory mapping:
#if (COMPILER == XY)
#define FUNC(rettype, memoryclass) __declspec(memoryclass) rettype /* adaption to compiler XY */
#else
#define FUNC(rettype, memoryclass) rettype /* default, no adaption */
#endif
FUNC(void, MYMODULE_CODE) MyMod_Function(void) /* this would become with XY __declspec(MYMODULE_CODE) void MyMod_Function(void) */
{ /*<-- indentation wrong, should start in column 1 */
/* do something */
}
So, is there a way to handle such code, or is this currently a bug of whatever does this in CDT?
Regards,
Henning
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev