[llvm-bugs] [Bug 51861] New: AlignConsecutiveDeclarations and PointerAlignment is wrong with double pointers

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Sep 14 13:26:40 PDT 2021


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

            Bug ID: 51861
           Summary: AlignConsecutiveDeclarations and PointerAlignment is
                    wrong with double pointers
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: mail at 3v1n0.net
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

When using a config including:

```
PointerAlignment: Right
AlignConsecutiveDeclarations: true
```

with code such as:

```
static void
foo_function (int *ptr,
              const char *path,
              GError **error)
```

We get:

```
static void
foo_function (int        *ptr,
              const char *path,
              GError    **error)
```

While an extra space is expected:

```

static void
foo_function (int         *ptr,
              const char  *path,
              GError     **error)
```

Not sure if this should be available through another
`AlignConsecutivePointerDeclarationStyle` option.

-- 
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/20210914/c5b4026a/attachment.html>


More information about the llvm-bugs mailing list