The broadway musical Mame features a song about this, entitled "Bosom Buddies", where Vera and Mame take turns sniping at each other while still simultaneously declaring their great affection, because friends are always honest with each other.
Mame: And if I say that sex and guts made you into a star/ It's just because who else but your Bosom Buddy will tell you how rotten you are!
Rod and Nicky in Avenue Q are this way too. From the song "It Sucks to be Me":
Rod: We live together -
Nicky: We're close as people can get.
Rod: We've been the best of buddies,
Nicky: Ever since the day we met.
Rod: So he knows lots of ways to make me really upset!
Rod: Oh, every day is an aggravation -
Nicky: Come on, that's an exaggeration!
Rod: You leave your clothes out, you put your feet on my chair.
Nicky: Oh yeah? You do such anal things like ironing your underwear!
Rod: You make the very small apartment we share a Hell!
Nicky: So do you! That's why I'm in Hell too!
By the end of the play, Nicky finds Rod a boyfriend to make up for outing him at Brian and Christmas Eve's wedding.
Depending on your interpretation, Benedick and Beatrice could be seen as this. They spend most of the play in a "merry war of wit" with insults that would hurt even the most tough-skinned. Underneath it all, though, they actually are very good friends who care a great deal about each other, and eventually even admit romantic feelings. However, it doesn't do much to stop their bickering and insults.
Cole Porter's song "Friendship", featured in Anything Goes, starts out as two friends expressing affection, but soon descends into sarcasm, with the two singers trading veiled barbs.