Skip to content

[clang-format] simple-requirements not formatted as expressions #121675

@rymiel

Description

@rymiel

Related to #121471.

Input and expected result:

template <typename T>
concept Multiplicable = requires(T a, T b) { a * b; };

Actual result:

template <typename T>
concept Multiplicable = requires(T a, T b) { a *b; };

Note that a simple-requirement is just an expression. Clang-format should be treating the contents of a requirement-body as an expression context but it is not doing so.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions