It was narrated from ‘Ali (رضي الله عنه) that He came to the Prophet (ﷺ) and said:
Abu Talib has died. The Prophet (ﷺ) said: “Go and bury him,” ‘Ali said: He died a mushrik. He said: “Go and bury him.” “Ali said: When I had buried him, i came back to the Prophet (ﷺ) and he said: “Do ghusl.”