It is disliked to offer the funeral prayer for the hypocrites, and to ask Allah‘s Forgiveness for the Mushrikun
باب مَا يُكْرَهُ مِنَ الصَّلاَةِ عَلَى الْمُنَافِقِينَ وَالاِسْتِغْفَارِ لِلْمُشْرِكِينَ
Sahih al-Bukhari, Book of Funerals (Al-Janaa'iz)(view book)
Sahih al-Bukhari 1366
Narrated 'Umar bin Al-Khattab :
When 'Abdullah bin Ubai bin Salul died, Allah's Apostle ﷺ was called upon to offer his funeral prayer. When Allah's Apostle stood up to offer the prayer, I got up quickly and said, "O Allah's Apostle! Are you going to pray for Ibn Ubai and he said so and so on such and such occasions?" And started mentioning all that he had said. Allah's Apostle smiled and said, "O 'Umar! Go away from me." When I talked too much he said, "I have been given the choice and so I have chosen (to offer the prayer). Had I known that he would be forgiven by asking for Allah's forgiveness for more than seventy times, surely I would have done so." ('Umar added): Allah's Apostle offered his funeral prayer and returned and after a short while the two verses of Surat Bara' were revealed: i.e. "And never (O Muhammad) pray for any of them who dies . . . (to the end of the verse) rebellion (9.84)" -- ('Umar added), "Later I astonished at my daring before Allah's Apostle on that day. And Allah and His Apostle know better."
حَدَّثَنَا يَحْيَى بْنُ بُكَيْرٍ، حَدَّثَنِي اللَّيْثُ، عَنْ عُقَيْلٍ، عَنِ ابْنِ شِهَابٍ، عَنْ عُبَيْدِ اللَّهِ بْنِ عَبْدِ اللَّهِ، عَنِ ابْنِ عَبَّاسٍ، عَنْ عُمَرَ بْنِ الْخَطَّابِ ـ رضى الله عنهم ـ أَنَّهُ قَالَ لَمَّا مَاتَ عَبْدُ اللَّهِ بْنُ أُبَىٍّ ابْنُ سَلُولَ دُعِيَ لَهُ رَسُولُ اللَّهِ ﷺ لِيُصَلِّيَ عَلَيْهِ، فَلَمَّا قَامَ رَسُولُ اللَّهِ ﷺ وَثَبْتُ إِلَيْهِ فَقُلْتُ يَا رَسُولَ اللَّهِ، أَتُصَلِّي عَلَى ابْنِ أُبَىٍّ وَقَدْ قَالَ يَوْمَ كَذَا وَكَذَا كَذَا وَكَذَا ـ أُعَدِّدُ عَلَيْهِ قَوْلَهُ ـ فَتَبَسَّمَ رَسُولُ اللَّهِ ﷺ وَقَالَ " أَخِّرْ عَنِّي يَا عُمَرُ ". فَلَمَّا أَكْثَرْتُ عَلَيْهِ قَالَ " إِنِّي خُيِّرْتُ فَاخْتَرْتُ، لَوْ أَعْلَمُ أَنِّي إِنْ زِدْتُ عَلَى السَّبْعِينَ فَغُفِرَ لَهُ لَزِدْتُ عَلَيْهَا ". قَالَ فَصَلَّى عَلَيْهِ رَسُولُ اللَّهِ ﷺ ثُمَّ انْصَرَفَ، فَلَمْ يَمْكُثْ إِلاَّ يَسِيرًا حَتَّى نَزَلَتِ الآيَتَانِ مِنْ {بَرَاءَةٌ} {وَلاَ تُصَلِّ عَلَى أَحَدٍ مِنْهُمْ مَاتَ أَبَدًا} إِلَى {وَهُمْ فَاسِقُونَ} قَالَ فَعَجِبْتُ بَعْدُ مِنْ جُرْأَتِي عَلَى رَسُولِ اللَّهِ ﷺ يَوْمَئِذٍ، وَاللَّهُ وَرَسُولُهُ أَعْلَمُ.