// This %thing% was generated from %template% using data from %data%.
If your language is too restrictive to add sensible tools, you should write the tools yourself. As with any code, write it in a way such that other people will be able to understand it.
There is no magic, it's just code. I wish people would stop using that word.
Where would you and the comment in a situation like that one?
I don't have anything against generated code but it should be visible and, as you said, it should be crystal clear where it come from
If the class is being used, then the definition has got to be somewhere, hopefully in a header. It's simply a file that is included somewhere. And it will be human readable. There is no magic.
Sometimes you have to get the job done in a "less than ideal" way. But a lot of documentation/comments should be left to justify and more importantly explain how it works.