Over on ADS-L, the quotation hounds have been considering
Is that a gun in your pocket, or are you just happy to see me?
which is widely attributed to a flirty Mae West — it *sounds* like the sort of thing she would have said — but without any actual source in some particular movie. There’s a huge family of variants here, constituting the verbal counterparts to the examples of visual phallicity I’ve so often posted about.
Gun, pistol, banana (the version I think of as “original”, just from my own remembered experience), and (as Larry Horn wrote on ADS-L)
also light sabers, chocolate bars and other long and (roughly) cylindrical objects. The links at [the tvtropes pages on "or you just happy to see me"] are instructive, even if the author of the text at the site takes it for granted (with no support offered) that it originated with West.
The site provides a parallel as far back as Aristophanes’ Lysistrata:
Herald: I am a herald, of course, I swear I am, and I come from Sparta about making peace.
Magistrate: But look, you are hiding a lance under your clothes, surely.
No doubt we could take the jape back into the mists of time. It’s a natural metaphor.