Sunan an-Nasa'i, Hadith 1952 ⓘ
It was narrated that Ibn 'Abbas said: "The Messenger of Allah was asked about he children of the idolators and he said: 'Allah knows best what they would have done."'
أَخْبَرَنِي مُجَاهِدُ بْنُ مُوسَى، عَنْ هُشَيْمٍ، عَنْ أَبِي بِشْرٍ، عَنْ سَعِيدِ بْنِ جُبَيْرٍ، عَنِ ابْنِ عَبَّاسٍ، قَالَ سُئِلَ النَّبِيُّ صلى الله عليه وسلم عَنْ ذَرَارِيِّ الْمُشْرِكِينَ فَقَالَ " اللَّهُ أَعْلَمُ بِمَا كَانُوا عَامِلِينَ " .
also referenced under: Book 21, Hadith 136 (In-Book) & Volume 3, Book 21, Hadith 1954 (DarusSalam)