clangformat: Fix compile error

Change-Id: Icdf4fcbc1c813557513bc1b0e8e8d2228a668e2b
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Marcus Tillmanns
2022-12-15 14:33:36 +01:00
parent 2f7263cd67
commit 0b6b31b4ba

View File

@@ -22,7 +22,7 @@ public:
: m_path(FilePath::fromString(QString::fromStdString(Path.str()))) : m_path(FilePath::fromString(QString::fromStdString(Path.str())))
{} {}
/// Destroy the file after closing it (if open). /// Destroy the file after closing it (if open).
/// Sub-classes should generally call close() inside their destructors. We /// Sub-classes should generally call close() inside their destructors. We
/// cannot do that from the base class, since close is virtual. /// cannot do that from the base class, since close is virtual.
~LlvmFileAdapter() { close(); } ~LlvmFileAdapter() { close(); }
@@ -50,8 +50,8 @@ public:
Q_UNUSED(IsVolatile); Q_UNUSED(IsVolatile);
const FilePath path = FilePath::fromString(QString::fromStdString(Name.str())); const FilePath path = FilePath::fromString(QString::fromStdString(Name.str()));
const std::optional<QByteArray> contents = path.fileContents(FileSize, 0); const expected_str<QByteArray> contents = path.fileContents(FileSize, 0);
QTC_ASSERT(contents, return std::error_code()); QTC_ASSERT_EXPECTED(contents, return std::error_code());
return MemoryBuffer::getMemBufferCopy(contents->data(), Name); return MemoryBuffer::getMemBufferCopy(contents->data(), Name);
} }
@@ -108,6 +108,8 @@ public:
/// \note The 'end' iterator is directory_iterator(). /// \note The 'end' iterator is directory_iterator().
vfs::directory_iterator dir_begin(const Twine &Dir, std::error_code &EC) override vfs::directory_iterator dir_begin(const Twine &Dir, std::error_code &EC) override
{ {
Q_UNUSED(Dir);
Q_UNUSED(EC);
Q_UNIMPLEMENTED(); Q_UNIMPLEMENTED();
return {}; return {};
} }