Sahih al-Bukhari, Book 82, Hadith 5 (Bukhari 6358)

Narrated Abu Huraira:

Allah's Messenger (ﷺ) was asked about the offspring of the pagans. He said, "Allah knows what they would have done (were they to live)."