An assertion failure was encountered after https://reviews.llvm.org/D126340:
llvm/clang/lib/AST/Decl.cpp:1510: clang::LinkageInfo clang::LinkageComputer::getLVForDecl(const clang::NamedDecl *, clang::LVComputationKind): Assertion `D->getCachedLinkage() == LV.getLinkage()' failed.
Just adding my own note of explanation, since this stuff can be a little hard to follow.
This inner linkage query needs to observe visibility in order to get a consistent result, even if the calling query (i.e. getLinkageInternal in this case) has passed in a LVComputationKind indicating we don't need to for the LocalDecl. If we don't, we may get results inconsistent with the cached value for the enclosing FunctionDecl, hence the assert.