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

    <tr>
        <th>Summary</th>
        <td>
            Clang error when using a constexpr variable as NTTP default value in lambda expression.
        </td>
    </tr>

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

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

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

<pre>
    ```c++
void foo()
{
    constexpr int x{};
    auto a = []<int=x>{};
}
```

Looks like a regression from 16 to 17, persists in 18 and current trunk. 

https://godbolt.org/z/TErqq79ao
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxcUctu4zoM_Rp6Q9TQw47jhRZtUq8uLmaRH5At2tFEkVI9Mpn5-oGbFBMUICRKPHycQ52SXTyRgvYN2n2lSz6GqJzRjlLS1RjMbwUbdrcJxNtqbA_s9RqswTkEEFsQ_f0PukcQEXEKPmW6XSJan_G2xro9yCeELjmgRpB7vPcHubM-g9zfQL5_S1j9u_M1zuP5ef4XwimhsydCjZGWSCnZ4HGO4Yx8gzkg70Ds8EIx2ZQTWo98i9obnEqM5DPmWPypxueyx5wvCeQriAHEsAQzBpfrEBcQwx8Qw-E9fnx0vQ6VUdL0stcVKd6JVsp-y_vqqJrNppvbpp0aGnkrpr4lLUzPxWjkNMq5skow0bCeSdYyKfuac7nperNtppnPXEzQMDpr62rnrue1d2VTKqQ461izrZweyaWvBUa1ol7GsiRomFuZ_svLNjtSO6f9ghRjiPjrSB5Lsn5B_bSwq45Wj45QJ_z_cPiBhmZdXMardoVW6Zw-j0bjir4rXVclOvVNL5uPZayncAYxrFM8rpdLDD9pyiCGTyoJxPBgc1XibwAAAP__61fHVg">