In erlang/otp#8295 I discovered that it is not possible to build documentation for Erlang (and possibly Elixir?) modules build using the +deterministic compiler flag.
When +deterministic is used, it will no longer be possible to locate the location of the source file, so I think that in such case ExDoc should not emit any links to the source code and all warnings/errors have to be emitted as best they can be.