[clang-format] Extra spaces surrounding arrow in templated member call in variable...
authormydeveloperday <mydeveloperday@gmail.com>
Fri, 17 Dec 2021 18:33:17 +0000 (18:33 +0000)
committermydeveloperday <mydeveloperday@gmail.com>
Sat, 18 Dec 2021 11:38:29 +0000 (11:38 +0000)
commit936a67f089efd31354cf1f1f3b864b81fb5aad0e
treed71b470f71757fc2dcd51b9a20e04f462772b60b
parent1ba99eaf70951a4aa062688577047d8a23bfe54c
[clang-format] Extra spaces surrounding arrow in templated member call in variable decl

https://github.com/llvm/llvm-project/issues/43196

Fixes #43196

-> is incorrectly interpreted as a TrailingReturnArrow if we've seen an auto

```
auto p = new A;
auto x = p -> foo<1>();
```

Reviewed By: curdeius

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