Inspired by: https://reviews.llvm.org/D82629
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
I can confirm that the test case crashes without the null pointer check and passes with the check.
Comment Actions
I think that adding an unittest for such a simple fix is a bit heavy handed. What about just exercising this code path. For example:
void Test(int N) { int arr[N]; decltype([&arr]{}) *p; // expected-error {{lambda expression in an unevaluated operand}} }