<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/123296>123296</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Clang crash when trying to evaluate a constexpr with `auto` type, variadic template before type is fully defined
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
bricknerb
</td>
</tr>
</table>
<pre>
Example:
```c++
struct MyClass {
template <int...> static constexpr auto foo() { return 1;}
static constexpr auto my_value = foo();
};
```
We get a "Unexpected undeduced type!" crash
Compiler Explorer: https://godbolt.org/z/7rhT7qEeE
I believe this should be an error that says the function `foo()` isn't defined yet because the class isn't fully defined, but not a crash.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxsUk-Pmz4Q_TTmMlpkBgibA4dsNpF-h9-tVY-VMUNw69jUHmdDP33lZFdpq0ojgdC8x7w_KkZzckS9aF9E-1qoxLMP_RCM_u4oDMXgx7U_XNV5sSTqnZC32cj7aIEveeQuckia4f91b1WMILr8EYDpvFjFBKLeG8dlWYr6AJEVGw3au8h0XQKoxB4m7wU-C9xmNATiFBxUon4R3Wsm-zfqvH69KJvyH14fFBkldxl4f_k4-H7_F4ITMSgQiJ8dXRfSTCMkN9KYNI3A60ICK4EIOqg4wx239-fFWApwuC7WBwqi3sHMvMRsDR4FHk9-HLzl0oeTwONPgccuzJ-6Hwc63Dn-g4GsoQsBzyZCnH2yIwwEygGF4APwrBiiWiPwTDAlp9l4B2IjH_I2Ekx0AjuGkSbjaISVGAbSKkW6AfUtiI-tKVm7fuwK3MOQGJzPJtwUlsXY1-O23qqC-qqru0rKBpti7ttqwo4qTdi2qmsntX1uJllpTaojiVSYHiW2sqo62bV105TPTUvtUHUdSt1s5CAaSWdlbGnt5ZydKUyMifoKa9xuCqsGsvHWQERtlTsJxFzG0GfA05BOUTTSmsjxQcGGLfX7vP6e0dtMDjisxp2APVCuRa6e-q0yb4bn7GSuTjbxHvQeLioYNRr9KOxAkw90WwAT__SvSMH2f-VueE5Dqf1Z4DEf-f54WoL_RpoFHm-io8Dju-5Lj78CAAD__zJ0HbQ">