data: record Clang Invocation errors as errors when nothing is recorded

This commit is contained in:
Eberhard Graether
2018-12-17 15:29:49 +01:00
parent 86190675a2
commit f169805fbc
4 changed files with 32 additions and 2 deletions
+2
View File
@@ -32,6 +32,8 @@ public:
virtual void recordComment(const ParseLocation& location) = 0;
virtual void recordError(const std::wstring& message, bool fatal, bool indexed, const FilePath& translationUnit, const ParseLocation& location) = 0;
virtual bool hasContent() const = 0;
};
#endif // PARSER_CLIENT_H
+5
View File
@@ -99,6 +99,11 @@ void ParserClientImpl::recordError(
}
}
bool ParserClientImpl::hasContent() const
{
return m_storage->getByteSize(1) > 0;
}
NodeType ParserClientImpl::symbolKindToNodeType(SymbolKind symbolKind) const
{
switch (symbolKind)
+2
View File
@@ -31,6 +31,8 @@ public:
void recordError(const std::wstring& message, bool fatal, bool indexed, const FilePath& translationUnit, const ParseLocation& location) override;
bool hasContent() const override;
private:
NodeType symbolKindToNodeType(SymbolKind symbolType) const;
Edge::EdgeType referenceKindToEdgeType(ReferenceKind referenceKind) const;