llvm-project
llvm-project copied to clipboard
[clang] assertion `isDependentContext() && "cannot iterate dependent diagnostics of non-dependent context"' failed
https://godbolt.org/z/EPrvvnfze
This crash is what I found while working on https://github.com/llvm/llvm-project/issues/57155.
// | |
// v v
int(*f)(int) = [](auto t) -> decltype([] {
return 0;
} ()
){
return t;
};
It looks like we didn't handle the logic of lambda expressions in decltype and auto parameters.
Lambdas in unevaluated contexts is a C++20 core language feature that we partially implemented. See P0315R4
Related to https://github.com/llvm/llvm-project/issues/57155 https://github.com/llvm/llvm-project/issues/45822
@llvm/issue-subscribers-clang-frontend
@llvm/issue-subscribers-c-2b
@llvm/issue-subscribers-c-20
I believe this is fixed after https://github.com/llvm/llvm-project/commit/ea4fd668c2cd88d13b36a5d64e3dedb1106340bc.
Thanks!