[clang-format] Disallow trailing return arrows to be operators
In the following construction: `template <typename T> requires Foo<T> || Bar<T> auto func() -> int;` The `->` of the trailing return type was actually considered as an operator as part of the binary operation in the requires clause, with the precedence level of `PrecedenceArrowAndPeriod`, leading to fake parens being inserted in strange locations, that would never be closed. Fixes one part of https://github.com/llvm/llvm-project/issues/56213 (the rest will probably be in a separate patch) Reviewed By: HazardyKnusperkeks, owenpan Differential Revision: https://reviews.llvm.org/D134049
Loading
Please sign in to comment