Say a tool that does some sort of automatic code generation or modification, like a formatter or linter, is run as a service that automatically creates pull requests to projects on Github. Who owns the copyright of those changes? What license restrictions would it have? Could the tool creator say "all changes made by this tool from now until the end of time are my intellectual property" even though they weren't involved in making the individual changes? How might a more conscientious tool creator properly declare that their tool's contributions can be merged in without licensing and IP problems?
As @amon stated in a comment, copyright requires creativity. If the author of a tool wants to claim copyright on the output of that tool, then that output must contain something that required the creativity of the tool author.
For a tool that just re-indents its input, the output is created from the input with a mechanical, non-creative, transformation and the output does not contain any creative content that wasn't already present in the input. For that reason, authors of such tools can't claim any copyright on the output.
For a tool like
bison, which was mentioned in the comments, the output contains a measurable amount of creative content that was not present in the input, but which was provided by the authors of
bison. For that reason, the authors of 'bison' do have a copyright claim on the output of the tool (for which they give a broad permission to use).
So, the basic question becomes, how much of the (creative) content of the output can be traced back to the tool itself and not to the input that the tool processed. For linters/formatters, that is likely to be very little. For code generators, it can be anywhere between very little and all of the output.
The license restrictions on the code produced by the tool itself are by default the same as the license restrictions on the source of the tool, but the tool author can choose to apply any other license to the tool code that ends up in the output.
If the output of the tool is, at least in part, dependent on an input file, then the authors of the input file also have a copyright claim on the tool output (as their creative work influenced the output), so the tool author can not claim exclusive ownership.
The usual situation is that for tools that don't add creative content to the output, the author explicitly states that the don't have any copyright claims on the output.
For tools that do add creative content, that content might be released under very permissive conditions (like, "you can use the output as a whole for any purpose, but you can only separate out the code that comes from the tool's codebase if you adhere to the <X> license")