K'ab al-Ahbar (may Allah have mercy on him) was asked: "Should the funeral prayer be offered for a disobedient warrior?" He replied: "A person is taken towards the grave, the grave does not come towards him, so offer the prayer."
Hadith Referenceسنن سعید بن منصور / كتاب الجهاد / 3675