You're relaxing in your car when a police officer knocks on your window. When you roll it down, a pungent waft of marijuana smoke hits the officer in the face. He then orders you out of your car, searches your vehicle, and finds marijuana. Wait, he didn't have a warrant to search! He tells you he doesn't need it because he recognizes the smell of marijuana.
Is it legal to do a warrantless search based on the smell of marijuana?