[clang] [clang-format] Option to ignore macro definitions (PR #70338)
Owen Pan via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 22 17:47:13 PST 2023
owenca wrote:
After giving more thoughts to this, I think what we really want is `SkipMacroDefinitionBody`, which would format the code below:
```
# define A a. b //comment
# define A( x , y ) ( ( x ) + ( y ) )
```
To the following:
```
#define A a. b // comment
#define A(x, y) ( ( x ) + ( y ) )
```
That is, only the body (except comments) of a macro definition is not formatted.
https://github.com/llvm/llvm-project/pull/70338
More information about the cfe-commits
mailing list