[clang-format] Fix QualifierOrder breaking the code with requires clause.
Fixes https://github.com/llvm/llvm-project/issues/53962. Given the config: ``` BasedOnStyle: LLVM QualifierAlignment: Custom QualifierOrder: ['constexpr', 'type'] ``` The code: ``` template <typename F> requires std::invocable<F> constexpr constructor(); ``` was incorrectly formatted to: ``` template <typename F> requires constexpr std::invocable<F> constructor(); ``` because we considered `std::invocable<F> constexpr` as a type, not recognising the requires clause. This patch avoids moving the qualifier across the boundary of the requires clause (checking `ClosesRequiresClause`). Reviewed By: HazardyKnusperkeks, owenpan Differential Revision: https://reviews.llvm.org/D120309
Loading
Please sign in to comment