Intrinsic anomalous Hall effect in type-II Weyl semimetals