I'd interpret RAW differently from the post above. The distinction about 'requires an attack roll' isn't about Produce Flame's uses that don't require an attack roll. It's about the difference between combat Cantrips that require an attack roll and are affected by partial cover (i.e. Produce Flame) verses ones that force a saving throw and ignore cover (i.e. Sacred Flame). The damaging part of Produce Flame requires an attack roll to hit, and is affected by partial cover. So, it qualifies. Just like Chill Touch, Fire Bolt, Eldritch Blast, etcetera. Cantrips like Sacred Flame, Poison Spray, Acid Splash require saving throws, are unaffected by partial cover, and don't qualify.