getSemanticDiagnostics

abstract fun getSemanticDiagnostics(    sourceFile: SourceFile = definedExternally,     cancellationToken: CancellationToken = definedExternally): <Error class: unknown class><Diagnostic>(source)

The first time this is called, it will return global diagnostics (no location).