The Prophet (ﷺ) was asked about the offspring of pagans (Mushrikeen); so he said, "Allah…

Sahih al-Bukhari Book 23 Hadith 137

Sahih al-Bukhari #1384

Funerals (Al-Janaa'iz) 23:137

Narrated Abu Huraira:

The Prophet (ﷺ) was asked about the offspring of pagans (Mushrikeen); so he said, "Allah knows what sort of deeds they would have done."

Chapter: The (dead) children of Al-Mushrikun

Grade: Sahih