At the very least he could claim he had probable cause to ask the person if he was carrying.
A police officer who asks you that is on very shaky ground. Suppose he says "no", does that then involve a search? Or what if he says "yes." The officer has asked the person to incriminate himself~ likely the case is thrown out of court.
If he searches that person, because he wasn't sure he was carrying a gun, then unreasonable search and detention.
The point is, if the police have not seen a gun, no gun was present.
And, if his response is due to a complaint of a third person, further thrown out of court.