Sahih al-Bukhari 1384
Sahih al-Bukhari · Book 23: Funerals (Al-Janaa'iz) · The (dead) children of Al-Mushrikun
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."