https://bugs.llvm.org/show_bug.cgi?id=48581
Bug ID: 48581
Summary: requires-expression braces and requirement-seq aren't
indented, constraint-expression further indented
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Formatter
Assignee: unassignedclangb...@nondot.org
Reporter: johel...@gmail.com
CC: djas...@google.com, kli...@google.com,
llvm-bugs@lists.llvm.org
.clang-format:
```yaml
```
Input and expected formatted result:
```C++
/*export*/ template <class T>
concept relative_quantity_field =
absolute_quantity_field<T> and std::same_as<T, relative_quantity_t<T>> and
requires(const T &c, T &l, const rep_t<T> &r) //
{
{ l *= r } -> std::same_as<T &>;
{ l /= r } -> std::same_as<T &>;
{ c *r } -> std::same_as<T>;
{ r *c } -> std::same_as<T>;
{ c / r } -> std::same_as<T>;
{ c / c } -> std::same_as<rep_t<T>>;
};
```
Actual output:
```C++
/*export*/ template <class T>
concept relative_quantity_field =
absolute_quantity_field<T> and std::same_as<T, relative_quantity_t<T>> and
requires(const T &c, T &l, const rep_t<T> &r) //
{
{ l *= r } -> std::same_as<T &>;
{ l /= r } -> std::same_as<T &>;
{ c *r } -> std::same_as<T>;
{ r *c } -> std::same_as<T>;
{ c / r } -> std::same_as<T>;
{ c / c } -> std::same_as<rep_t<T>>;
};
```
The _constraint-expression_ has an extra indentation, for 4 spaces instead of
the default 2. The _requirement-seq_ and braces of the _requirement-expression_
are missing such an extra indentation.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs