-
Notifications
You must be signed in to change notification settings - Fork 12k
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] Incorrectly formatted macro #78965
Comments
It is being interpreted as a unary minus on the call (
|
OK, I can bypass the issue with |
Could you please let me know, @rymiel? |
I think improvements can always be made, I'd keep it open for now, but I wouldn't expect it to be resolved any time soon |
Wow, it got fixed earlier than I expected, thanks to you both! |
…79549) Fixes llvm#78965. (cherry picked from commit f826f55)
/cherry-pick f826f55 |
…79549) Fixes llvm#78965. (cherry picked from commit f826f55)
/pull-request #80593 |
PR has been created, we will track the status there. |
…79549) Fixes llvm#78965. (cherry picked from commit f826f55)
…79549) Fixes llvm#78965. (cherry picked from commit f826f55)
…79549) Fixes llvm#78965. (cherry picked from commit f826f55)
…79549) Fixes llvm#78965. (cherry picked from commit f826f55)
…79549) Fixes llvm#78965. (cherry picked from commit f826f55)
It looks like f826f55 caused a regression in macro formatting: #define MAX ((uint32_t)-1) now gets formatted as #define MAX ((uint32_t) - 1) while ClangFormat 17 leaves it as is. This commit was backported to stable releases, so 18.1.3 also exhibits the problem. Both versions still correctly recognize uint32_t max = (uint32_t)-1; and don't change it. |
This was fixed in 0baef3b. |
Shouldn't the proper output be the following?
The text was updated successfully, but these errors were encountered: