Hi!
So far I haven’t found a way to tell clang-format to not touch macro definitions. I’ve run into two cases where I think clang-format is doing the wrong thing:
First:
#define A(x) x:
will be formatted as:
#define A(x) \
x:
and second case:
#define A A is deprecated. Use B instead.
will become:
#define A A is deprecated.Use B instead.
A flag like IncludeMacroDefintions
set to false
should be a pretty straightforward solution.