c++ - libclang/libtooling 处理或关闭所有错误输出

标签 c++ c libclang

我想一切都在标题里^^ 事实上,我正在使用 libtooling 开发一个工具,但我想抑制所有错误(该工具旨在仅在正确的源上使用,因此错误输出会污染 stderr...)。

最佳答案

标题是libclang/libtooling,这里是libclang的答案。像这样创建你的 CXIndex:

bool excludeDeclarationsFromPCH = false;
bool displayDiagnostics = false;
CXIndex index = clang_createIndex((int)excludeDeclarationsFromPCH, (int)displayDiagnostics);

参见 documentation .

关于c++ - libclang/libtooling 处理或关闭所有错误输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23343568/

相关文章:

c++ - SSL 握手错误 : session id context uninitialized

c++ - 在发布版本中使用 QImage 读取 Jpeg 错误

c++ - 使用 python libclang 检索评论

c++ - RapidXML XML 解析错误

c++ - 使用 OpenSSL 编译时的 qtum-core 构建问题

c - Linux 上的 RPC 多线程服务器 - Pthreads

c++ - 在 libclang 访问者中将成员函数作为参数传递

c++ - 不能在 Qt 中使用 libclang

c - 输出返回为 0.00

c - 在C中打印UTF-8多字节字符