This is a sub-issue of https://github.com/llvm/clangir/issues/1192 I'll try to implement it these days.