The formula you have written applies to a system, with $S_{gen}$ being the entropy generated in the interior of the system, and $\int~dQ/T$ being the entropy flux across the system's boundary. To apply this equation to the example of heat exchange $Q$ between two heat reservoirs at temperatures $T_1$ and $T_2$, with $T_1>T_2$, you must first define your system. If you take the hot reservoir or cold reservoir as your system, then indeed there is no entropy generated within their interior, and only flux term remains (equal to $-Q/T_1$ or $+Q/T_2$ depending on your choice of system). However if you take both of them together as a system, then flux term will become zero (because heat flux is then internal) while entropy generation term will be non-zero (equal to $Q/T_2-Q/T_1$).
For any process to be labeled as irreversible, entropy change not of any particular system but that of the entire universe (system+surroundings) must be considered. Obviously, for the universe flux terms are always zero (there is nothing else to exchange heat with), and any increase in entropy is always $S_{gen}$.
P.S. Any isolated system is a universe unto itself.