“The leader of the hypocrites in
Al-
Madinah died, and left instructions that the Prophet (ﷺ) should
offer the funeral prayer for him and shroud him in his shirt. He
offered the funeral prayer for him and shrouded him in his shirt, and
stood by his grave. Then Allah revealed the words: ‘And never pray
(the funeral prayer) for any of them (hypocrites) who dies, nor stand
at his grave.”
Sunan Ibn Majah Book 6, Hadith 92