DiagnosticNoteRenderer asserts trying to emit its "while building module Foo imported from bar.h:5" note when the presumed location of the import is invalid. This assertion was added in r267914, where most uses of getFilename were updated to test isValid instead.
I can't come up with a test because this location is always valid in C-based code, but external clients that manually import modules (*cough*Swift*cough*) sometimes provide invalid SourceLocations.
rdar://problem/26099576