By setting the
-serialize-diagnostics-path option to the compiler, I can get a binary file containing serialized diagnostics. I would like to programmatically process the content using Swift code, but don't know where to start.
I tried reading
lib/Frontend/SerializedDiagnosticConsumer.cpp in order to find the data written to the diagnostics file. I somewhat understand what is in the output, but I can't figure out the structure of it. I'm quite bad at reading C++. :(
Could someone point me to the right direction and help me understand it?