-
Notifications
You must be signed in to change notification settings - Fork 10.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[clang-format] A space is missing after a word token #92688
Comments
@llvm/issue-subscribers-clang-format Author: hev (heiher)
A space is missing after `xor` in the following case with the PR https://github.com//pull/90161.
Expected formatting: void test(void) {
static void (*xor)(uint8_t *, size_t, uint8_t);
xor = resolve_xor_x86();
} Actual formatting: void test(void) {
static void (*xor)(uint8_t *, size_t, uint8_t);
xor= resolve_xor_x86();
} |
As Actual and expected formatting: void test(void) {
static void (*valid_func_name)(uint8_t *, size_t, uint8_t);
valid_func_name = resolve_xor_x86();
} |
I forgot that there is also the pure C world, where |
Hi @owenca, stumbled across the problem myself and opened a draft as a starting point. I'm not sure how far you've gotten. Feel free to participate or discard if you have a better solution. I left some questions in the PR as some things are still not clear to me. |
PR llvm#90161 uncovered a bug that annotates C++ xor as UnaryOperator if followed by a binary operator. This patch fixes that and all other C++ alternative operator keywords when followed by a binary operator in C. Fixes llvm#92688.
A space is missing after
xor
in the following case with the PR #90161.Expected formatting:
Actual formatting:
The text was updated successfully, but these errors were encountered: