Hover fly larvae, like most fly larvae are maggots and relatively sedentary. Female hover flies lay eggs on plants with aphids, the primary food of predatory hover fly larvae. If aphid populations are adequate, development and survival to the pupa stage can approach 100%.
Ants can alter the math. The reason is clear from a study involving ants, syrphid larvae and aphids.* In the presence of ants, only about half the hover flies survive to the pupa stage. Female hover flies are less likely to lay eggs on aphid infested plants when ants are present, an adaptation to reduced survival of offspring. Ants can have substantial effects on biological control of insect pests.
*Alireza Amiri-Jami, Hussein Sadeghi-Namaghi & Francis Gilbert. Performance of a predatory hoverfly feeding on Myzus persicae reared on two brassicaceous plants varies with ant attendance. Biological Control 105 (2017) 49–55.