[clang-format] Disallow requires clauses to become function declarations
There already exists logic to disallow requires *expressions* to be treated as function declarations, but this expands it to include requires *clauses*, when they happen to also be parenthesized. Previously, in the following case: ``` template <typename T> requires(Foo<T>) T foo(); ``` The line with the requires clause was actually being considered as the line with the function declaration due to the parentheses, and the *real* function declaration on the next line became a trailing annotation (Together with https://reviews.llvm.org/D134049) Fixes https://github.com/llvm/llvm-project/issues/56213 Reviewed By: HazardyKnusperkeks, owenpan Differential Revision: https://reviews.llvm.org/D134052
Loading
Please sign in to comment