efriedma added a comment. That approach looks better. But I think you missed a use of Idx in the magic_cst path? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99481/new/ https://reviews.llvm.org/D99481