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

    <tr>
        <th>Summary</th>
        <td>
            [HLSL] Syntactic ambiguity between annotations and constructors
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          llvm-beanz
      </td>
    </tr>
</table>

<pre>
    We don't technically need to fix this until HLSL adds constructors (202y?) but it might be nice to fix it sooner.

Compiling this code in Clang reveals syntactic ambiguity:

```hlsl
struct S {
  int X;
  S(int I) : X(I) {}
};
```
[Compiler Explorer](https://godbolt.org/z/fs67q5dsz)

The `:` gets treated as an annotation syntax rather than as a constructor delegation.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxkUl1v2zoM_TX0C9FAluOPPPghaa5xL9C3XGB9lSzG1qBImUR3TX_9oLjdug0QIFGiDs8hj0rJTp6oh_oA9bFQC88h9s69XB40Kf9W6GBu_RdCEzzIlpFpnL0dlXM39EQGOeDZviLPNuHi2Tr89-n0hMqYhGPwieMycogJQXZSyBtUA8gd6oXRMl7sNDNqQm9H-sCyjCkET3EDYg9i_xguV-usn9YqYzCE1uOjU37CSC-kXMJ086xGtiOqi7bTYvkG1X4FgEasa3bJgdivpPCE0B5A7BGtZ3yGag1OILt88V_mCdUen0F2a9AeoD1mwPa4Zv9Ezuf6sDKliP-8Xl2IFKE-guxm5mvKbOQAcpiC0cHxJsQJ5PAGcjinpv1Wm_QGcrcy_n8mzKhVroATcUKOpJgMqoTKo_I-sGIb_Kr8FaPimSLynF8Tqs_dR0OOpnv6pjB9ZXbVThXUl60su6rrRFPM_VnXWyGMVueypLEqd9W53tXV7qybStTtWNheCrkVrdyWTVXJZrNtc7pqdKNr3Zw72Aq6KOs22UBZX2FTWqgvhdiWTeGUJpfuXpMyuwSkzK77MNwyJdgKZxOnXwhs2d39ef9QH_H096BRE38n-tyV3CTzmwGLJbr-j0lYnhe9GcMF5JArvm8P1xi-0sggh7uABHJ41_DSyx8BAAD__4E8BPg">