[clang]: clang crashed with `Assertion 'D->getCachedLinkage() == LV.getLinkage()' failed` in `clang::LinkageComputer::getLVForDecl` when try to return a lambda with another lambda inside its trailing noexcept specifier #97587
It seems that it's necessary to have lambda{...} inside noexcept(noexcept(...)) for triggering this assertion.
Additionally, it's known that there's another ICE in clang (related to name mangling): #70064 which is pretty similar to this (maybe actually unrelated).
does not crash without assertion, so perhaps the assertion turned out to be a false positive
Reproducer (See online compiler: https://godbolt.org/z/5srGToPG6)
Assertion:
Stacktrace:
Note:
lambda{...}
insidenoexcept(noexcept(...))
for triggering this assertion.