How would you tell someone that you have a whooping cough but you don't have pertussis?
If you're not talking about the disease then you're just describing the cough.
You could use a synonym for whoop: clamor, howl, bark,
You could try a different description: a violent cough.
You could make a joke out of the confusion: He had a cough that happens to whoop. Not that there is anything wrong with that.
The noun whoop exists outside of any whooping-cough context. Whilst OED sense 1b deals with the sound made in whooping-cough, it makes clear that the term is also applied to similar sounds - with particular reference to the example from 1899.
1b. The characteristic sonorous inspiration following a fit of coughing in whooping-cough. Also applied to similar sounds (see quot. 1899).
1873 A. Flint Treat. Princ. Med. (ed. 4) 240 A long and labored inspiration then takes place, giving rise to a crowing sound evidently due to spasm of the glottis; this is the whoop which enters into the name of the affection.
1897 T. C. Allbutt et al. Syst. Med. II. 239 When the whoop appears his power of communicating the disease begins to decline.
1899 T. C. Allbutt et al. Syst. Med. VII. 452 Occasionally the impediment is aggravated by the occurrence of associated sounds with the stutter, the patient emitting unpleasant little whoops, grunts, or whimpering sounds during his efforts to speak.