Benadryl for my 1 year old?

So I went to the doctors today because my son has had a terrible cough, my son will be 1 on March 1st and weighs 25 pounds. My doctor told me that I could give him Benadryl, so I went and picked it up and it said on the label that children under 2 should not use. This kinda scares me.. I know my doctor told me this would be okay, but has anybody ever used Benadryl for their baby who was under 2?