Assume some system with constant heat capacity $C_V$ at initial temperature $T_0$ is in thermal contact with a reservoir at temperature $T$. As is typically done, the net entropy increase in the universe when the system heats up, is calculated by using the identity in the title of this question, which gives
$$ \Delta S_{sys} = \int_{T_0}^T \frac{dq}{T'} = \int_{T_0}^T \frac{C_V dT'}{T'} = C_V \ln \left ( \frac{T}{T_0} \right ) $$
$$ \Delta S_{res} = \int \frac{dq_{res}}{T} = -\frac{1}{T} \int dq = -\frac{1}{T} C_V (T-T_0) $$
And one can show that $\Delta S_{sys} + \Delta S_{res}>0$. However, this process is clearly irreversible to me. The total entropy in the universe has increased. So how can I have used an identity which is said to only be valid for reversible processes to show this?