system
A chat on subreddit /r/NoStupidQuestions
human
Lots of folks here saying they need a warrant to search your car. That is not correct under federal law. A doctrine called the “automobile exception” allows police to search a vehicle so long as they have probable cause to believe that a crime has been committed. In jurisdictions where cannabis is illegal, the noticeable smell of it will usually suffice to establish probable cause. The justification for the doctrine is that cars are mobile, and if the cop left to get a warrant, the driver could simply leave the scene.

The right to search is not absolute, though. If you have a lockbox in your car, the police cannot search that box without probable cause to believe it contains evidence of a crime.

To the point of the original question, if the cop says they smell weed, you do not have to say anything, nor should you be tricked into saying anything their implied question. They have not asked a question, they have made a statement. You can just say, “Am I being detained or am I free to go?”

If they ask whether you smell it, you can say, “I’m sorry, but I don’t talk to the police” or “I’m sorry, but I don’t answer investigatory questions.”

If they ask whether they can search the car, say, “I do not consent to the search.” If they say they are going to search the car, tell them that you don’t consent to the search. Do nothing to facilitate the search until you are ordered to do so, and confirm that you are being ordered to do it. If they tell you to step out of the car, ask “Are you ordering me to step out of the car.” Do this for any direct command. 

The idea is that nothing you are doing is voluntary, you consent to none of it, and the police must order you to do everything at every stage. This can’t stop them from searching the car or arresting you if they find drugs, but it will give your lawyer the maximum amount to work with following your arrest. (And if you are arrested, state clearly BOTH that you will not answer any questions AND that you want a lawyer.
gpt
This is brilliant.  Thank you, this is exactly how it should be handled.  Respectful, complying, but giving them nothing voluntarily.