Madness works in two steps: first, when you discard a card with madness, it is exiled instead of going to the graveyard, and its madness ability triggers (CR 702.35b). Second, you may cast it for its madness cost; if you don't, it moves to the graveyard (CR 702.35c).
Leyline of the Void states that if a card would be put into an opponent's graveyard from anywhere, exile it instead. When you discard a card, it would normally be put into your graveyard. Leyline of the Void intercepts that replacement effect and sends the card to exile directly (CR 614.1a).
The madness replacement effect (CR 702.35b) also wants to exile the card and trigger the ability. When two replacement effects apply to the same event, the affected player (the one discarding) chooses which to apply first (CR 616.1). However, once Leyline's replacement effect is applied and the card is exiled by Leyline, the card never enters the graveyard through the normal discard path, and crucially the madness trigger only occurs if the card was exiled by the madness replacement effect itself. Since Leyline's exile is not the madness exile, madness does not trigger.
In practice: if your opponent controls Leyline of the Void and you discard Fiery Temper, Leyline's effect exiles it as a plain exiled card with no madness trigger, so you cannot cast it for its madness cost of R.
Note: If you control Leyline of the Void and discard your own card, Leyline does not apply to your own graveyard (it only affects opponents' graveyards in its printed text), so madness would still function normally for the controller of the card being discarded.
Unofficial fan resource — not affiliated with or endorsed by Wizards of the Coast. Answers are AI-generated estimates grounded in the Comprehensive Rules and are not a substitute for an official judge. Verify anything match-critical.