swift
a4c09d6c - api-digester: Emit JSON errors during diagnose-sdk

Commit
1 year ago
api-digester: Emit JSON errors during diagnose-sdk The diagnostic consumers for swift-api-digester -diagnose-sdk were being set up after JSON files were read in, so errors in those files were silently dropped. In at least one case this led to a crash with no hint about what was happening. Set up the diagnostic consumer before doing any serious work to avoid this problem. Fixing this required me to make `newCompilerInstance()` copy diagnostic consumers to the new instance’s diagnostic engine, since compiler instances were now being created after the consumers were added instead of before. I also had to make FilteringDiagnosticConsumer filter out clang warnings, remarks, and notes since those were now being emitted early enough to register in the digester.
Author
Committer
Parents
  • include/swift/APIDigester
    • File
      ModuleAnalyzerNodes.h
  • lib
    • APIDigester
      • File
        ModuleAnalyzerNodes.cpp
      • File
        ModuleDiagsConsumer.cpp
    • DriverTool
      • File
        swift_api_digester_main.cpp
  • test/api-digester
    • File
      diagnostics.swift
  • validation-test/WholeSDK
    • api-digester.test