Issue |
133663
|
Summary |
[clang-format] can't format pointer correctly when using _Generic
|
Labels |
clang-format
|
Assignees |
|
Reporter |
LeoriumDev
|
```c
#define json_add(object, key, value) \
_Generic((value), \
JSON *: json_add_object, \
JSON_array *: json_add_array, \
int: json_add_int, \
char*: json_add_str, \
bool: json_add_bool, \
default: json_add_null)(object, key, value)
```
The above code is what i am working on after using clang-format.
when i try to use clang-format `PointerAlignment: Left`, the JSON and JSON_array doesn't seem to be formatted correctly. it should be JSON* and JSON_array*. I think it only happens when i am using _Generic.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs