We consider large-dimensional Hermitian or symmetric random matrices of the form W = M + theta V, where M is a Wigner matrix and V is a real diagonal matrix whose entries are independent of M. For a large class of diagonal matrices V, we prove that the fluctuations of linear spectral statistics of W for C-2 test function can be decomposed into that of M and of V, and that each of those weakly converges to a Gaussian distribution. We also calculate the formulae for the means and variances of the limiting distributions.