From his father (Ibn 'Umar) that the Prophet ﷺ heard 'Umar saying: "By my father, By my father!" So he said: "Verily Allah prohibits you from swearing by your father." So 'Umar said: "By Allah I did not swear by him after that, neither intentionally nor in narrating."
سَمِعَ النَّبِيُّ ﷺ عُمَرَ وَهُوَ يَقُولُ وَأَبِي وَأَبِي فَقَالَ أَلاَ إِنَّ اللَّهَ يَنْهَاكُمْ أَنْ تَحْلِفُوا بِآبَائِكُمْ فَقَالَ عُمَرُ فَوَاللَّهِ مَا حَلَفْتُ بِهِ بَعْدَ ذَلِكَ ذَاكِرًا وَلاَ آثِرًا قَالَ وَفِي الْبَابِ عَنْ ثَابِتِ بْنِ الضَّحَّاكِ وَابْنِ عَبَّاسٍ وَأَبِي هُرَيْرَةَ وَقُتَيْلَةَ وَعَبْدِ الرَّحْمَنِ بْنِ سَمُرَةَ