I am facing a problem as follows:
I am using clang library to produce and traverse the AST, but I cannot get the error code if the source code has a compile error. When it runs to the folllowing command, it just outputs the error message on the screen:
clang::ParseAST(
compilerInstance.getPreprocessor(),
&consumer,
compilerInstance.getASTContext()
);