I want to capture the source files error and warnings when I give it as a input to my libtooling tool.
For example consider the program
main.c
int main()
{
printf("hello");
return 0;
}
so clang throws warning implicitly declaring library function 'printf' with type 'int'.
How to capture these warnings in clang libtooling with DiagnosticConsumer
?