From cfdd332a18db9b173f763d31d3e28cd92d60dfab Mon Sep 17 00:00:00 2001 From: Eberhard Graether Date: Tue, 16 Oct 2018 17:08:59 +0200 Subject: [PATCH] cxx: Only log clang invocation errors when present --- src/lib_cxx/data/parser/cxx/CxxParser.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib_cxx/data/parser/cxx/CxxParser.cpp b/src/lib_cxx/data/parser/cxx/CxxParser.cpp index 5e0a6e74..e227daea 100644 --- a/src/lib_cxx/data/parser/cxx/CxxParser.cpp +++ b/src/lib_cxx/data/parser/cxx/CxxParser.cpp @@ -193,7 +193,10 @@ void CxxParser::runTool(clang::tooling::CompilationDatabase* compilationDatabase { const ClangInvocationInfo info = getClangInvocationString(compilationDatabase); LOG_INFO("Clang Invocation: " + info.invocation); - LOG_INFO("Clang Invocation errors: " + info.errors); + if (!info.errors.empty()) + { + LOG_INFO("Clang Invocation errors: " + info.errors); + } } ASTActionFactory actionFactory(m_client, canonicalFilePathCache, m_indexerStateInfo);