Skip to content

clang-format 20 ignores reference alignment in requires clause #149010

@ozars

Description

@ozars

This is a change of behavior from clang-format 19.

Example .clang-format:

Language: Cpp
Standard: c++20
PointerAlignment: Left
ReferenceAlignment: Left
DerivePointerAlignment: false

Example input file:

bool kTrivialExample = requires { static_cast< int && >(1); };

Example output with clang-format 20:

bool kTrivialExample = requires { static_cast<int &&>(1); };

Example output with clang-format 19:

bool kTrivialExample = requires { static_cast<int&&>(1); };

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions