Chiral symmetry and the Yang--Mills gradient flow