[clang-format] Further improve requires clause detection
authorBjörn Schäpers <bjoern@hazardy.de>
Fri, 24 Jun 2022 06:02:35 +0000 (08:02 +0200)
committerBjörn Schäpers <bjoern@hazardy.de>
Sat, 25 Jun 2022 02:43:38 +0000 (04:43 +0200)
commitb3aeca3962bb39dfe110472ea033bda32044455d
tree81a6d1f2cf3fccd1d2339026f101c44bf1f514d9
parent72ec31afadd01e413b34ee8d18233f659da3e8e8
[clang-format] Further improve requires clause detection

If there is a typeish token before the requires, it can't be a requires
expression.

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

Differential Revision: https://reviews.llvm.org/D128496
clang/lib/Format/UnwrappedLineParser.cpp
clang/unittests/Format/TokenAnnotatorTest.cpp