ClangTools: Fix showing diagnostics from clang-tidy on Windows

When reading file paths from clang-tidy's YAML files, ensure to
clean/normalize the file paths. Otherwise, no diagnostics will be shown
as they are not accepted by the is-file-part-of-project filter.

Change-Id: Iacff9ab5611072ca0b19788f6861f73c244258cc
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Nikolai Kosjar
2019-11-27 11:38:01 +01:00
parent 3e72fd9f45
commit 2ca150c097

View File

@@ -347,7 +347,7 @@ public:
int extraOffset = 0) int extraOffset = 0)
: m_node(node) : m_node(node)
, m_fileCache(fileCache) , m_fileCache(fileCache)
, m_filePath(asString(node["FilePath"])) , m_filePath(QDir::cleanPath(asString(node["FilePath"])))
, m_fileOffsetKey(fileOffsetKey) , m_fileOffsetKey(fileOffsetKey)
, m_extraOffset(extraOffset) , m_extraOffset(extraOffset)
{} {}