I don't quite like the if statement in the patch, but given that ASTReader::Error and DelayedDiagnostic only take strings, it is hard to just change err_fe_pch_file_modified to take a %select that depends on an integer.
On the other hard, it seems impossible to have another diagnostics in flight when emitting err_fe_pch_file_modified. Is it okay to just use Diag instead of Error?
Unfortunately I was not able to come up with a test that outputs this diagnostics for a module file.