Narrated Ibn 'Umar:
'Abdullah bin 'Abdullah bin Ubayy came to the Messenger of Allah (ﷺ) when his father died, and said: 'Give me your shirt to shroud him in and perform the Salat upon him, and seek forgiveness for him.' So he (ﷺ) gave him his shirt, and said: 'When you are finished then inform me.' So when he wanted to perform the Salat, 'Umar tugged at him and said: 'Has not Allah prohibited that you perform Salat over the hypocrites?' He said: 'I have been given the choice between two: 'Whether you seek forgiveness for them or you do not seek forgiveness for them.... (9:80)' So he performed the Salat for him. Then Allah revealed: 'And never pray for any of them who dies, nor stand at his grave... (9:84)' So he abandoned praying for them.