In the D&D systems, rulebooks, or novels there are no solid restrictions that I can find on weapons inside of a tavern...inside Waterdeep or elsewhere. On perusing the Forgotten Realms wiki, I came across 18 distinct taverns in Waterdeep. Not a single article says anything about rules regarding weapons in the taverns.
The only source I can find that says anything about any tavern anywhere is from the Out of the Abyss module where...
While in the Shattered Spire tavern in Gracklestugh, a fight breaks out between two Duergar. It explicitly says that the stone guard doesn't show up unless weapons come out. As long as it's just a fist-fight, the guard doesn't care
This rather strongly implies that the patrons are allowed to keep their weapons on their person, if there was a risk of weapons coming out during the brawl.
Now, expanding out to broader fantasy fiction, in which a lot of the 'feel' of D&D is rooted...
It is very common for Taverns in a fantasy realm to allow patrons to keep their weapons. Just to provide a few examples...
In Lord of the Rings, at the Prancing Pony, Strider was carrying his sword while in the tavern. In the film version you can catch a glimpse of it on his hip after Frodo re-appears, and Strider is dragging him up the stairs.
In A Song of Ice and Fire (Game of Thrones), there are several scenes that revolve around people being armed while in a tavern. For example, the numerous fights that break out at the Inn of the Crossroads.
It's common to see, in writing, a 'shady' tavern being identified by the fact that the people inside keep a hand near their weapons.
Now, to look at a historical perspective...
Again, there were many extremes. And, often, the rules were different between nobles and commoners.
In some English cities, it was forbidden for commoners to carry swords at all...
Than no-one shall carry knives or other weapons longer than the city measure that hangs in front of the city hall and at the gates, on penalty of a five pound fine
(A. Telting: Stadtboeken van Zwolle, Zwolle 1897, p302)
The 'City Measure' that it speaks of is a dummy knife hung on a chain in a conspicuous location (in this case, at the gates and at city hall). If your blade was bigger than the model they hung up and you weren't Noble...you aren't allowed to carry it.
Nordic Law ruled that any freeman could carry weapons at any time. However, for certain events (such as the Alþing [Althing]) you were required to either lay aside your weapon, or 'peace tie' it (secure it into its scabbard with leather straps or rope so it could not be easily drawn). And given that Nordic Law allowed for Lethal Reprisal Attacks as an answer for someone impugning your honor...most likely you would have weapons anywhere.
In Utrect (Netherlands), there was a law that specifically addresses what you're talking about here. Innkeepers were required to store their patrons arms and armor, and report any suspicious individuals to the mayor. But, again, this was not necessarily the norm across all of Europe.
Now to speak purely practically for an in-game perspective, keep this in mind...
Weapons Are Expensive.
In 5e, the market price of a longsword is 75 days of wages for a Commoner. As a result, most people who own swords are going to be hesitant to just hand them off to a stranger.
For comparison, imagine that you went into a bar and they required you to check your iPhone at the door. If it was some hole-in-the-wall bar with no surveillance systems, would you trust them to hang on to it for you and keep it safe?
So, for a tavern-keeper, he has to decide if his establishment is the sort of place that people are going to trust to hold on to their very expensive weapons. Is he going to get into constant arguments from his customers that they don't trust his patrons to not take their stuff? Or, should he just keep a big cudgel hung above the bar, and hire a few brawny thugs to beat the stuffing out of anyone who draws steel in the tavern? Or, does he just charge you extra if you get blood on his floor?
And even with a nicer tavern, the rules may not be consistent. If a Nobleman shows up at the tavern, he may very well refuse to disarm his honor guard--and the barkeep just goes along with it because he doesn't want to upset a noble.
For a simple rule of thumb...if the tavern is sufficiently fancy that you would trust them to hold on to your extremely expensive weaponry (especially once you start carrying around magic weapons), then they might ask you to check your weapons. Otherwise? Probably not.