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

    <tr>
        <th>Summary</th>
        <td>
            Lambda does not see const integer initialized by constexpr from the enclosed scope
        </td>
    </tr>

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

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

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

<pre>
    This program

```
int main() {
    const int i = 0;
    []{
 (void)i;
    }();
}
```

is accepted by GCC and MSVC, but Clang rejects it with the error:
```
error: variable 'i' cannot be implicitly captured in a lambda with no capture-default specified
```

Online demo: https://gcc.godbolt.org/z/jdPjn4Y1d


</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8UluL2zwQ_TXyy7BBkePbgx--TfD30tJCS6GPuoztWWTJSHLa7K8vjpNmW5aCkNCcuZwzMzJGGhxiy4pnVpwyuaTRh7ZDEzLlzaX9OlKEOfghyInxE-P_3e6S3871Sy7BJMkxUTPRAKueNzsAgPYuJlg9CFh-As7yN-hW-BHARH32ZJho6E-_6rQl_21dLe9xuTGKILXGOaEBdYH_j0eQzsDHL9-OTBxBLQmOVroBAr6gThEowQ9KI6QRAUPwgeXva72DcJaBpLIITFTERAVaOucTKASaZkuakr2AlnNaAhogBxKsnJSRWyXn7-CTwV4uNkGcUVNPaP6h7JOz5BAMTn5lMaY0x5Wr6JjoBq13gzfK27TzYWCie2WiezGfX9zh-968zZOZNjdN3sgM231Z11VRiqbKxhZ5oXXFm5z3NZrelMI0dcELIw6N4jnPqBVc5Lzi1b4u6n25M6Jo6rLoc7lXQheGHThOkuzO2vO08sgoxgXbMq8ORWalQhvvKxfa1elJLUNkB24ppvgIS5Qsth-2phmPEdYGR8THVuGAAchRImnpdZv2FcSfc4A--GkbqdPWRzQQtZ8xW4Jt_-ocpXFRO-0nJrqVwO15moNfN4SJ7ioiMtFddfwKAAD___uC-EU">