Looks like is a known issue:
Siri Intents
Known Issues
The compiler produces warnings on the Swift code that an intent definition file generates. Because Xcode regenerates this file on subsequent builds, manually fixing the warnings isn't an effective workaround. (76283893, 78107564)
https://feedbackassistant.apple.com/news/4990
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: