Fiqh-us-Sunnah Volume 4, Funerals and Dhikr, Fiqh 4.051.

Section : Funeral Prayer for a Non-believer.

A Muslim may not pray for a non-believer, for Allah says: “Nor do you ever pray for any of them that dies, nor stand at his grave, for they rejected Allah and His Messenger,” Qur’an 9.84 “It is not fitting for the Prophet and those who believe to pray for forgiveness for pagans, even though they be of kin, after it is clear to them that they are companions of the Fire. And Ibrahim prayed for his father’s forgiveness only because of a promise he had made to him. But when it became clear to him that he (his father) was an enemy to Allah, he dissociated himself from him.” Qur’an 9.113-114

Likewise no prayer may be offered for their children, for what applies to their parents applies to them as well, except for children who accept Islam, because one of their parents was a Muslim or they die or are taken prisoner separately from either or both of their parents, then a funeral prayer may be offered for the children.