Just because an officer on a traffic stop asks a question, does not mean you have to answer it.
I have never been asked, but should it ever happen, I would tend to change the subject or say "no comment". If he asks to search the car, I would say no.
Our state patrol can see my CPL when they check my drivers license, but even with that knowledge, l have never been asked on a traffic stop, even when I OC and they can see my carry. Your sidearm has nothing to do with a burned out lamp or any other thing you may have a traffic stop for.
Of course, I don't get stopped very often, but I have been stopped a few times...
Where I live this kind of stuff is not a problem, but should it happen....