The Swift compiler checks to see if inputs were modified during the build, and produces an error if they were. This logic is in checkForOutOfDateInputs in Compilation.cpp. However, the diagnostic is emitted with an invalid location (SourceLoc()). In theory, it would make sense to emit it on the first line of the file that changed, as well as any similar diagnostics about a textual input file. However, we don't have a SourceLoc for that file, because we haven't loaded the file into the driver.
We should do something about this.