Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] CodeStyle - Indenting of Code Problem

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





Back to the top