<div dir="ltr"><div><div> I was hoping to use libclang to parse files to write a generator. As a test, I was using libui (<a href="https://github.com/andlabs/libui/">https://github.com/andlabs/libui/</a>), however, as I ran index.parse, all I get is a clang.cindex.TranslationUnitLoadError, which I can catch, but I cannot seem to find a way to deal with figuring out _why_ it fails. I noticed in cindex.py:<br><br># o API support for invalid translation units. Currently we can't even get the<br>#   diagnostics on failure because they refer to locations in an object that<br>#   will have been invalidated.<br><br></div>So it appears I cannot get the diagnostic info? If not, would I be able to get diagnostics if I use the underlying clang_parseTranslationUnit in C? I don't mind wrapping some C code if needed.<br><br><br></div>Thanks for any guidance you can provide!<br></div>