https://github.com/NagyDonat approved this pull request. LGTM. By the way, when I first read this function, I was surprised to see that it is defined inline despite its relatively complex body. https://github.com/llvm/llvm-project/pull/248181