[clang-format] Fix annotating when deleting array of pointers
authorjackh <jackhuang1205@gmail.com>
Tue, 30 Aug 2022 05:56:45 +0000 (13:56 +0800)
committerjackh <jackhuang1205@gmail.com>
Fri, 2 Sep 2022 21:56:49 +0000 (05:56 +0800)
commit3bbdf06b28275a56ad36a844d271d84956d1d7e9
treef568de23c6096c858315b16fef896f0512fbcfc8
parent53dac0980dfc8ca7b63e79e460a73bbff999dd18
[clang-format] Fix annotating when deleting array of pointers

Fixes https://github.com/llvm/llvm-project/issues/57418

The token `*` below should be annotated as `UnaryOperator`.

```
delete[] *ptr;
```

Reviewed By: owenpan, MyDeveloperDay

Differential Revision: https://reviews.llvm.org/D132911
clang/lib/Format/TokenAnnotator.cpp
clang/unittests/Format/FormatTest.cpp
clang/unittests/Format/TokenAnnotatorTest.cpp