inbelic wrote: Updated to include diagnostics output and the relevant testing. I have rebased to split the pr into smaller incremental changes. But I have taken care to address all previous comments. https://github.com/llvm/llvm-project/pull/122981