| Issue |
52876
|
| Summary |
Recognize code blocks inside pre-processor directives in clang-format
|
| Labels |
|
| Assignees |
|
| Reporter |
Julien-Elie
|
When using:
```
IndentWidth: 4
PPIndentWidth: 1
```
the following code:
```
#define ENTRY(args, flags) \
do { \
if (args->debug) \
putil_log_entry((args), __func__, (flags)); \
} while (0)
```
is rewritten:
```
#define ENTRY(args, flags) \
do { \
if (args->debug) \
putil_log_entry((args), __func__, (flags)); \
} while (0)
```
The pre-processor specific indentation should not be applied to C code defined in such directives.
Couldn't an exception be made to `#define` (and maybe other directives)? Or a way to state there is C code here?
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs