<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/64799>64799</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [clang-format] Compactify types for `PointerAlignment: Right` and abstract declarators | Add `CompactAbstractDeclarators` option
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          Eisenwave
      </td>
    </tr>
</table>

<pre>
    Unless `PointerAlignment: Left` is used, abstract declarators are formatted like:
```cpp
array<int *> arr;
array<int &> arr;
array<int()> arr;

using T = int *;
using T = int &;
using T = int();
```
Not only is the syntax `int *` ugly, it's also inconsistent with how functions are formatted. It should be `int ()`.

## Suggested Solution
Add a `CompactAbstractDeclarators: Boolean` option, which is enabled by default.
```cpp
// PointerAlignment: Right, ReferenceAlignment: Right
// CompactAbstractDeclarators: True
using A = int*;
using B = int&;
using C = int();
using D = int[];

// CompactAbstractDeclarators: False
using A = int *;
using B = int &;
using C = int ();
using D = int [];
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMlNGO8jYQhZ_GuRktcmxwyEUuAvxIlaqq2t0-gJNMErfGRvZkad6-ClkWhABVQkTJscfH882MjtF0DrFgqw1b7RI9UO9D8ctEdCf9hUnlm7H4y1mMEZjif3rjCENpTecO6IjJEn7HlpjiYCIMERsmtqCrSEHXBA3WVgdNPkTQAaH14aCJsAFr_kEmS8Z3jJdM8flXH4_zFx2CHpncGkfARMnkL9AhMLl5JKsXMhNrJvL7BfP_EI3r4BOY3MHPQZtnmnqmXY7Y3F1mfv3DE3hnxyk_1CPE0ZH-d0rm5UjFYejsOCXOEBNZBG2jB-Nq76KJhI7gZKiH3p-gHVxNxru7fC7gN4LY-8E2UOE1-tmZ4ovbazMhmZDwMXQdxonFh7fDFHOWy6YBPUXY-sNR11R-w9xdWU7YN95b1G5y74_n3WILp97U_XRTdLqy2EA1QoOtHiwtnqFmYs_EHh6V1rvpeprivmOLAV2ND-TbIK8tf4YBbwmWV4L34DdX6Z779gn3Wd39qOeOuqu4_2Vzr2187PNBhW5eVOj2RntlFe69XhglTSGbXOY6wSJVuZCKS5kmfSGaWucVLpcS161QaYaSK5VlrUyrOl3niSkEF5Kv03Uq-EqmC0xXrRJCZ-uMy1xJtuR40MYurP06LHzoEhPjgIVaZnmeWF2hjZepFIpp0Vs1dJEtuTWR4nUbGbLn-VVb7bq3uSPYandJsmlHoPGIcWqWZzNsriTFQbvm8fRi2RamznjdFz_NkAzBFj3RcSI6U-8M9UO1qP2Bif1k__vxdgz-b6yJif05BZGJ_TkL_wUAAP__pC-zDg">