-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Description
Running clang-format 21.1.1 on the following which was indented using clang-format 19:
const char* Element::getName(std::size_t eIdx) {
return (getStructType()->getElements())[eIdx]->getName();
}
using _clang-format
:
---
BasedOnStyle: Google
IndentWidth: 4
...
results in the incorrect addition of spaces around the pointer arrow operator " -> ":
const char* Element::getName(std::size_t eIdx) {
return (getStructType()->getElements())[eIdx] -> getName();
}
clang-format 19 does not add the whitespace around the pointer arrow operator.
Note, I'm upgrading from clang-format 19 to 21 and I did not try 20, so not sure when the behavior regressed.
Metadata
Metadata
Assignees
Type
Projects
Status
Done