[llvm-bugs] [Bug 48581] New: requires-expression braces and requirement-seq aren't indented, constraint-expression further indented
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Dec 22 21:40:41 PST 2020
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: unassignedclangbugs at nondot.org
Reporter: johelegp at gmail.com
CC: djasper at google.com, klimek at google.com,
llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201223/7e98e23d/attachment.html>
More information about the llvm-bugs
mailing list