It is narrated from Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) that he said: I heard the Messenger of Allah (peace and blessings be upon him) saying: "Among the worst of people are those upon whom the Hour comes while they are alive, and those who take graves as places of worship (masjids)."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 10375