It worked only correct for a tab as the first char.
Details
Diff Detail
Event Timeline
The behaviour of tabs still doesn't match that of spaces, but at least this makes it idempotent.
This also fixes https://github.com/llvm/llvm-project/issues/51808, I'm closing it as duplicate in favor of the issue fixed by this patch.
I did initially looked into that, but then asked do we want to treat tabs equally to spaces?
It would add a lot of logic, and the question how to map SpacesInLineCommentPrefix to tabs?
This also fixes https://github.com/llvm/llvm-project/issues/51808, I'm closing it as duplicate in favor of the issue fixed by this patch.
Thanks.
clang/unittests/Format/FormatTestComments.cpp | ||
---|---|---|
736 | error: reference to type 'const clang::format::FormatStyle' could not bind to an lvalue of type 'const char[61]' "//\t\t\t\tofMap(message.velocity, 0, 127, 0, ofGetWidth() * 0.2)"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
clang/unittests/Format/FormatTestComments.cpp | ||
---|---|---|
736 | Nvm. It's stacked now. |
Thanks for unstacking it!
clang/unittests/Format/FormatTestComments.cpp | ||
---|---|---|
66–67 | Similar to what's done in FormatTest.cpp. |
Similar to what's done in FormatTest.cpp.