We consider QCD with massive quarks. First, we review how requiring the existence of solutions to the Euclidean equations of motion for the gauge fields implies boundary conditions of vanishing physical fields at infinity. Gauge freedom then leads to distinct topological sectors of integer winding number. The latter implies that the coefficient theta of the CP-odd topological term in the action behaves as an angular variable. To look for CP-violating observables, we then turn to fermion correlation functions. We therefore construct the Green's function for a fermion with complex mass. As a particular detail, we show how the spectral decomposition of the Green's function can be continued between Euclidean and Minkowski space. For an instanton gas and within fixed topological sectors, we then obtain the fermion correlations, which do not exhibit CP-violation. As per the general arguments for the boundary conditions, these correlations are valid for infinite spacetime volumes. It then remains to interfere between the topological sectors. For infinite spacetime volumes, the interferences turn out to be immaterial what leads to the prediction of the absence of CP violation in QCD. To conclude otherwise, one would have to interfere within finite spacetime volumes, which is at odds with the above assumptions leading to integer winding numbers. We finally verify that the present calculation does not imply a violation of the principle of cluster decomposition and discuss periodic boundary conditions for finite volumes, i.e. the setup that is assumed for lattice simulations.