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

    <tr>
        <th>Summary</th>
        <td>
            [Clang] Representation of ellipsis in AST
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang:frontend
      </td>
    </tr>

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

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

<pre>
    Consider the following snippet with different usages of ellipsis:
```cpp
void foo() {
  try {}
  catch(...){} // #1
}

void bar(...); // #2
```
`clang -Xclang -ast-dump` outputs the following (omitting built-in typedefs):
```
TranslationUnitDecl
|-FunctionDecl <line:1:1, line:4:1> line:1:6 foo 'void ()'
| `-CompoundStmt <col:12, line:4:1>
|   `-CXXTryStmt <line:2:3, line:3:14>
|     |-CompoundStmt <line:2:7, col:8>
|     `-CXXCatchStmt <line:3:3, col:14>
| |-<<<NULL>>>
|       `-CompoundStmt <col:13, col:14>
`-FunctionDecl <line:6:1, col:13> col:6 bar 'void (...)'
```
The first ellipsis (catch-all) is represented by `<<<NULL>>>` which comes from https://github.com/llvm/llvm-project/blob/b48ebad561dbbaddd989de3e9509253247dbf4b2/clang/lib/AST/TextNodeDumper.cpp#L245

The second ellipsis (vararg) is not represented at all.
Are those representations (or lack of thereof) by design? Is this inconsistency intentional?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUVV2P8igU_jV4c6JBqP246IWvTpNNJu_Fjm8ytxROLbsIDdCZ9d9vaNVRd2eTTTCUA89zvo8iBH20iDXZ_CCb_UKMsXe-frFKG2MWrVPneuds0Ao9xB6hc8a4T22PEKweBozwqWMPSncderQRxiCOGMB1gMboIehA-JbQPaFbktN5yWGYJR9OK-icI6wkrAJS_JjlANGfp2Oxv0qkiLInrFytVoRV8x0Q1hDWAGF8fdFxBdwpaIX_wvEfdyD2ZNjtKI2wR1i-X3YR4lKNp4HkFNwYhzGGp2gQVrqTjjF9t6M2caktxPOACrsw6X0Ownw8eGGDEVE7-8vquEdpro7sls1oZbpJUiB8Z7RFwrfr6cd2cDlns-wF7u7zFFYgrJgiMMeXsOLGDSSny507DW606i2eYuKXziQ4-xfuLyDM0Pf3gz9fgZfHjPAtvwPzBM6e0ADJtWfVdwxFYphNKf-JnXXvUjE8YflV-8WNR8VJKeG7ef389fqabuf1oAD-KzLf0Of0u1Tl11TdCPjL5TtPdXmfoUuB3pL0VCip3LQP8dZXCTM1xVIYk9pHB_A4eAxoIypoz8mVb3zOKXz2WvYg3QkDdN6doI9xmLp16o-jjv3YrqQ7EdYY83HdloN3f6CMhDWtcW3ashJboTb5WrWtUEpVZaWQY7WhFdtwlhWq7bKWEdZM_ZSIdAJu3w6ENQf8K_50CvfjaUC_SsOB8VeWbe4bObkfUDqrHvz_EF7448V56-JDAEQEYcxqJth6hNi7gF9Ppq6baJwHI-SfaWrFHj26LlG2Z1CY5iPhDfyWOl4H0FameRgiWnkGbSPaRCMM4c1C1VxVvBILrNd5uSnLKqd00deZZLzljEq5riq-5qLMkRfrTcu4yGmlFrpmlHGa02ydZZTSVVZlnWgVk6wQXBUFySiehDarlIKV88eFDmHEOudrmi-MaNGEaYgzNseYbzvvknWKMJZGu6-n7LXjMZCMGh1i-CKLOprpT2A3gTd7-P0hSvfzHLSF7dthMXpT_--SmawOhDWT4X8HAAD__wW85w8">