Properly handle libclang diagnostics
This commit is contained in:
parent
183aeaafde
commit
db0e649bf6
7 changed files with 79 additions and 13 deletions
|
|
@ -11,6 +11,13 @@
|
|||
|
||||
using namespace cppast;
|
||||
|
||||
bool diagnostic_logger::log(const char* source, const diagnostic& d) const
|
||||
{
|
||||
if (d.severity == severity::error)
|
||||
error_ = true;
|
||||
return do_log(source, d);
|
||||
}
|
||||
|
||||
bool stderr_diagnostic_logger::do_log(const char* source, const diagnostic& d) const
|
||||
{
|
||||
std::fprintf(stderr, "[%s] [%s] %s %s\n", source, to_string(d.severity),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue