I am trying to compile code at runtime using libclang. I am giving ti deliberately malformed code to try to see how to print error messages.
To this effect I am calling clang_parseTranslationUnit2
on my faulty string. And sure enough it returns an error code but that is about it. I would like to get some form of error message, ideally similar to the errors you get when compiling through the terminal with clang.
Is this possible? I have searched the documentation and I am looking at the headers and I don't see anything of the sort.