The Messenger of Allah ﷺ used to invoke against some men from among the polytheists, calling them by their names, until Allah revealed "Not for you, [O Muhammad, but for Allah], is the decision whether He should [cut them down] or forgive them or punish them, for indeed, they are wrongdoers" [Al Imran 3:128]. So he stopped doing that.
حدثنا هارون حدثنا عبد الله بن وهب أخبرني أسامة بن زيد عن نافع
كان رسول الله ﷺ يدعو على رجال من المشركين يسميهم بأسمائهم حتى أنزل الله {ليس لك من الأمر شيء أو يتوب عليهم أو يعذبهم فإنهم ظالمون} فترك ذلك