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

    <tr>
        <th>Summary</th>
        <td>
            [HLSL] better error on lambda
        </td>
    </tr>

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

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

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

<pre>
    
Now we'll report error on auto l = []()  {}; like:
error: expected expression

Better to report something like "lambda is not supported in HLSL".

It reports "expected expression" because we don't enable C++11 in langOpts.
The code for starting lambda parsing is in Parser::ParseCastExpression under case tok::l_square:
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxtUk2PnDAM_TXhYhVBwueBw7K0aqVVW6m9VwG8kE4moUnodv99HZiO9lDJSmxiPz8_M9r5tWPZwLKHz_YFXpDxWmtwuFkXAJ2zDqwBuQcLGpgYgJU9KwfGG8ZbAFb3rB6Y6EGrCzLxcGIdhRQB_tlwCjhHx6H3ypoz4zx7DAEdEPito7dXDKsyy4EHjHMtr-MsQXkwlt73LeYRoDLw8enbE2WkbxE_hRuUj8X_a885jDjJ3SONC3P8UtOoRo4a4ZHxnizPI76WZvmyBX9r8H1FmOyM8Eyi-CBdOHie_DbpfAyJJ1V-pQijAGSH_yh9eH_nALuZaexJEodgL2ee_uF_7dJFERPs8qoqq6yp8iqZOzG3opVJUEFjRws4Bi8HmuOQ776mk0uyO92tIWw-AvMPZIsK6z6mk71SoPXvf9e7zdmfpBCFyvsdPTllI3ibrF2DbSGaCeeiyMpJtBOWdZlnbYOjlGX-nGg5ovaRD2l62wWxSlTHM87zLI-HEFVat4jtlGPFi7qSU8GKDK9S6TRSSK1bEtcdbMZ98fSolSfR74-SNFsMHpNHfPoZV-u67ZUuIy6LxOQg3x3M_wLrkeXo">