nemanjai wrote: I think it would be preferable to have an actual diagnostic for this. I propose a slightly different solution to this issue. Please review https://github.com/llvm/llvm-project/pull/236782. https://github.com/llvm/llvm-project/pull/236161