No, it really works in general (it has to be generalized if there are chemical reactions or electric fields, however), at least when you use it to calculate the change in energy between the starting and end point of the process.
But let me consider a simple example: suppose you are stirring a glass of some viscose liquid. The work done is not equal to -pdV obviously, ideally the volume does not change at all. Nevertheless all the work done on the liquid will eventually end up increasing the temperature of the liquid. So this is a completely irreversible process where all the work done is converted into entropy.
You may consider a reversible process (at least as judged from the liquid sub-system considered) where I heat up the liquid by bringing the liquid into contact with a heat bath whose temperature slowly increases (which can be due to a reversible or irreversible process). If the heat capacity of the heat bath is very small compared with the capacity of the liquid, I could imagine that the increase of temperature of the heat bath is also realized by stirring some viscous liquid (or rubbing the outside of the container). So the energy change dU is really the same in both cases, only that in one case the irreversible step takes place inside the container (then W neq -pdV=0 and TdS=W neq Q=0) and in the other case outside (then W =-pdV=0 and TdS=Q). In both cases dU=TdS-pdV and dU=Q+W are true.