Bug filed here: https://bugs.llvm.org/show_bug.cgi?id=45213
To resolve it, we let the checks for mangling LambdaContextDecl to be analogous to ItaniumMangle strategy: https://github.com/llvm/llvm-project/blob/master/clang/lib/AST/ItaniumMangle.cpp#L1829
Will this fix work if the inline variable is in a namespace, or inline function?
This code seems like maybe it should live in getEffectiveDeclContext. Are you sure the fix won't be there?