[llvm-bugs] [Bug 48576] New: Extra file-wide indentation with trailing parenthesized requires-expression in requires-clause

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Dec 22 14:14:12 PST 2020


https://bugs.llvm.org/show_bug.cgi?id=48576

            Bug ID: 48576
           Summary: Extra file-wide indentation with trailing
                    parenthesized requires-expression in requires-clause
           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
IndentRequires: true
```

Input and expected formatted result:
```C++
template <class T>
  requires x and (requires { y; })
struct w {};

int z;
```

Actual output:
```C++
template <class T>
  requires x and(requires { y; }) struct w {};

  int z;
```

Having a trailing, parenthesized requires-expression in a requires-clause
results in the rest of the file having an extra indentation level.

-- 
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/20201222/09dd19c8/attachment.html>


More information about the llvm-bugs mailing list