[FIR] KT-44698: Print file:line:offset on K2 crash

^KT-44698 Fixed
This commit is contained in:
Nikolay Lunyak
2022-09-21 15:08:52 +03:00
committed by teamcity
parent bba5b87733
commit 2e9f9f987b
24 changed files with 363 additions and 147 deletions
@@ -93,9 +93,11 @@ class FirAnalyzerFacade(
val collector = FirDiagnosticsCollector.create(session, scopeSession)
collectedDiagnostics = buildMap {
for (file in firFiles!!) {
val reporter = DiagnosticReporterFactory.createPendingReporter()
collector.collectDiagnostics(file, reporter)
put(file, reporter.diagnostics)
withFileAnalysisExceptionWrapping(file) {
val reporter = DiagnosticReporterFactory.createPendingReporter()
collector.collectDiagnostics(file, reporter)
put(file, reporter.diagnostics)
}
}
}
return collectedDiagnostics!!