Sunan an-Nasa'i #1951
The Book of Funerals 21:135
It was narrated that Ibn 'Abbas said:
"The Messenger of Allah was asked about the children of the idolators and he said: 'Allah created them when He created them, and He knows best what they would have done."'