Commit 0b9438a
committed
[clang-format] Fix designated initializer detection
Currently, in the following snippet, the second designated initializer
is incorrectly detected as an OBJC method expr. Fix that and a test to
make sure we don't regress.
```
Foo foo[] = {[0] = 1, [1] = 2};
```1 parent 20ebc7e commit 0b9438a
File tree
2 files changed
+10
-0
lines changed- clang
- lib/Format
- unittests/Format
2 files changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
708 | 708 | | |
709 | 709 | | |
710 | 710 | | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
711 | 716 | | |
712 | 717 | | |
713 | 718 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3361 | 3361 | | |
3362 | 3362 | | |
3363 | 3363 | | |
| 3364 | + | |
| 3365 | + | |
| 3366 | + | |
| 3367 | + | |
| 3368 | + | |
3364 | 3369 | | |
3365 | 3370 | | |
3366 | 3371 | | |
| |||
0 commit comments