ftynse wrote: I'm not sure this fixes the issue I originally raised. My point was that we shouldn't report two diagnostics for the same error, not the location or the contents of the second diagnostic. https://github.com/llvm/llvm-project/pull/69331