Which then necessitates one of two different follow-up responses:
Situation 1: A smile and a “You’re welcome” while you then proceeed to go about your business
Situation 2: Either a) a “yes” and then you proceed to go about your business or b) “Sorry. I didn’t realize you were a complete fucking nutjob. Forget I said anything,” as you back away slowly.
I’m sure that you realize that Chris Rock is a comedian, and as such is going for a humorous response, vs. attempting to prove a case.
Can I imagine a good lookin’ guy getting charged? you bet, have seen it too.
As for the OP, I think you’ve gotten excellent advice. “It depends” on what you say, how you say it, the circumstances which include the setting, the personal connection (if any) of the woman, and other assorted things such as cultural issues. Clue # 1 - if she takes a half step back, gets a frozen smile on her face and a ‘deer in the headlight’ look in her eyes -she didn’t appreciate it.