-
Notifications
You must be signed in to change notification settings - Fork 13.5k
clang-format improperly formats some string operators #43887
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
Comments
Tested on 10, same |
This is caused by the following in "mustBreakBefore()" which to be honest I think looks wrong. I don't understand why we MUST break between 2 string literals. (I've seen this bug reported before) if (Right.is(tok::lessless) && Right.Next && |
*** Bug #38220 has been marked as a duplicate of this bug. *** |
we are discussing here https://reviews.llvm.org/D80950 |
Instead, leave the line wrapping as is. Fixes llvm#43887. Fixes llvm#44363.
Extended Description
this line
log_error(log_, "from" << "asdf");
(we have some code written which makes it perfectly legal if not nicely looking c++)
is formatted into this
log_error(log_, "from"
<< "asdf");
None of the options that look even remotely relevant have any effect. It's specific to 2 strings, if you replace a string with some other type it doesn't break the line. Tested on versions from 6 till 9.
The text was updated successfully, but these errors were encountered: