How? By being hit more than the other melee characters?
Because that is not melee! Hypnotic pattern and fireball are not melee attacks. This is like saying a Longbow is a better melee weapon than a scimitar. It isn't because a longbow is not a melee weapon, you don't make melee attacks with it, and if you have a longbow in your hand you won't dominate melee with it.
Suggesting the Wizard can dominate melee with fireball is like saying the PAM fighter can dominate spellcasting with his Glaive
Hypnotic Pattern and Fireball are spells, a wizard casting them might dominate combat with them (but I would argue they are not actually good spells for that either), but they won't dominate melee with those spells.
The fighter chassis can already dominate melee, having the best weapons, the largest number of attacks the best fighting styles (for melee combat), most feats, great survivability and a number of subclasses with powerful melee abilities as well. You can make builds with other classes, to include wizard, to rival that and in a niche role even exceed what many fighters can do in melee, but no other class is as built for and is generally as dominant in melee as a fighter. The fighter does not need buffs to make him better at what he is already best at, just like the Wizard does not need buffs to make him a better caster.
a BASE Cleric or BARD using nothing from their subclass are a full caster. If you're going to calculate fighter damage with their class features, you should probably ley the cleric and bard use theirs. - And note that this is assuming we are talking about non-melee-type clerics and bards being put into melee.
The discussion is about who is better in melee. A high-strength cleric with a good heavy armor and martial weapon subclass can be close to a base no subclass fighter in melee in tier 1 and maybe early tier 2, but he is going to be outrun by quite a bit later in tier 2 and that gap will get wider still in tier 3 and beyond.
I am not sure a Bard can ever really match up with a fighter in melee at all, although to be fair I don't play a lot of them .... mostly because they suck.
Sure they have spells, but most of their spells are not melee oriented and most actually reduce your melee damage because they take a full action to cast. There are some are good melee bonus action spells - sanctuary and shield of faith come to mind, but their power is limited and if you are casting sanctuary every turn after you make your melee attack you are going to run out of spell slots quickly.
Also worth noting that melee-oriented rogues actually keep up pretty well with base fighters in terms of damage dealt. Why do you feel that this is not the case?
They can keep it close if they have a blade cantrip, but they won't keep up well in melee without that, considering the fighter is getting more attacks, using better weapons, has better ac, more hit points and does not need any sort of situations to maximize his damage. A rogue in melee is going to generally use disengage or dash a lot which is going to eliminate both TWF and steady aim.
You have to get sneak attack every single turn for a melee Rogue to be roughly equal to a fighter (and they will still fall behind an optimized fighter with a subclass). While you get sneak attack most turns, you don't get it all the time. Disadvantage kills sneak attack completely for a melee-oriented Rogue and that alone usually happens at least once or twice every level. Add in when you win initiative (which happens often) and you don't have allies in position.
I play more Rogues than any other class. They are awesome fun, but they can't keep up with Fighters or really any martials in melee. If you give them some missile weapons and take arcane trickster subclass and martial adept that helps their overall damage, but they are still behind if they focus solely on melee.
Encouraging opponents to attack them rather than their allies does not mean that the fighters will "dominate melee". If your cleric casts one spell then sits out the rest of the fight making no further attacks, cantrips, or other spells, that is a player issue, not a class issue.
I was replying to someone and his point was that clerics don't have enough to do enough in combat, that they don't have enough support options and their attacks are irrelevant so there is nothing to do. I was pointing out that if you make the fighter more powerful the cleric will be even more irrelevant by comparison.
Keeping the fighter better but in the same ballpark makes the other characters weapon attacks and to a degree cantrips more relevant. Still not as good, but meaningful. If your fighter is doing 70DPR, who cares if your cleric can tack on 8 more with his mace. If your fighter is doing 20DPR that boost matters.