[all-commits] [llvm/llvm-project] d9abcd: [clang-format] Fix ObjC method indent after f7f9f94b
Krasimir Georgiev via All-commits
all-commits at lists.llvm.org
Thu Mar 25 02:53:00 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d9abcdd9f471ab0d986197e94498a5cf90aa12ef
https://github.com/llvm/llvm-project/commit/d9abcdd9f471ab0d986197e94498a5cf90aa12ef
Author: Krasimir Georgiev <krasimir at google.com>
Date: 2021-03-25 (Thu, 25 Mar 2021)
Changed paths:
M clang/lib/Format/UnwrappedLineParser.cpp
M clang/unittests/Format/FormatTestObjC.cpp
Log Message:
-----------
[clang-format] Fix ObjC method indent after f7f9f94b
Commit
https://github.com/llvm/llvm-project/commit/f7f9f94b2e2b4c714bac9036f6b73a3df42daaff
changed the indent of ObjC method arguments from +4 to +2, if the method
occurs after a block statement. I believe this was unintentional and there
was insufficient ObjC test coverage to catch this.
Example: `clang-format -style=google test.mm`
before:
```
void aaaaaaaaaaaaaaaaaaaaa(int c) {
if (c) {
f();
}
[dddddddddddddddddddddddddddddddddddddddddddddddddddddddd
eeeeeeeeeeeeeeeeeeeeeeeeeeeee:^(fffffffffffffff gggggggg) {
f(SSSSS, c);
}];
}
```
after:
```
void aaaaaaaaaaaaaaaaaaaaa(int c) {
if (c) {
f();
}
[dddddddddddddddddddddddddddddddddddddddddddddddddddddddd
eeeeeeeeeeeeeeeeeeeeeeeeeeeee:^(fffffffffffffff gggggggg) {
f(SSSSS, c);
}];
}
```
Differential Revision: https://reviews.llvm.org/D99063
More information about the All-commits
mailing list