Clang: Move printing functions in clang support to unit tests

The printing functions are only used by the unit tests and they use an
external API. So we can easily move them to the printing functions in
the unit test project. We have to move the TokenInfo print functions too
because the depend on other print functions. The rest of the print
functions will be moved in other patches.

Change-Id: I87c452f8ca40687ec47de675ba6bee13efa5655b
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Marco Bubke
2017-11-30 16:11:40 +01:00
parent 8cce4daa80
commit bb62fd3e56
106 changed files with 768 additions and 716 deletions

View File

@@ -27,8 +27,6 @@
#include <QDebug>
#include <ostream>
namespace ClangBackEnd {
QDebug operator<<(QDebug debug, const CancelMessage &)
@@ -38,9 +36,4 @@ QDebug operator<<(QDebug debug, const CancelMessage &)
return debug;
}
std::ostream &operator<<(std::ostream &os, const CancelMessage &/*message*/)
{
return os << "()";
}
} // namespace ClangBackEnd

View File

@@ -49,7 +49,6 @@ public:
};
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const CancelMessage &message);
std::ostream &operator<<(std::ostream &os, const CancelMessage &message);
DECLARE_MESSAGE(CancelMessage)
} // namespace ClangBackEnd

View File

@@ -27,8 +27,6 @@
#include <QDebug>
#include <ostream>
namespace ClangBackEnd {
QDebug operator<<(QDebug debug, const AliveMessage &/*message*/)
@@ -36,9 +34,4 @@ QDebug operator<<(QDebug debug, const AliveMessage &/*message*/)
return debug.nospace() << "AliveMessage()";
}
std::ostream &operator<<(std::ostream &os, const AliveMessage &/*message*/)
{
return os << "()";
}
}

View File

@@ -29,8 +29,6 @@
#include <QDataStream>
#include <iosfwd>
namespace ClangBackEnd {
class AliveMessage
@@ -53,7 +51,6 @@ public:
};
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const AliveMessage &message);
std::ostream &operator<<(std::ostream &os, const AliveMessage &message);
DECLARE_MESSAGE(AliveMessage)
}

View File

@@ -27,8 +27,6 @@
#include <QDebug>
#include <ostream>
namespace ClangBackEnd {
#define RETURN_TEXT_FOR_CASE(enumValue) case CompletionCorrection::enumValue: return #enumValue
@@ -55,17 +53,5 @@ QDebug operator<<(QDebug debug, const CodeCompletedMessage &message)
return debug;
}
std::ostream &operator<<(std::ostream &os, const CodeCompletedMessage &message)
{
os << "("
<< message.m_codeCompletions << ", "
<< completionCorrectionToText(message.neededCorrection()) << ", "
<< message.m_ticketNumber
<< ")";
return os;
}
} // namespace ClangBackEnd

View File

@@ -91,7 +91,6 @@ public:
}
friend CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const CodeCompletedMessage &message);
friend std::ostream &operator<<(std::ostream &os, const CodeCompletedMessage &message);
private:
CodeCompletions m_codeCompletions;

View File

@@ -27,8 +27,6 @@
#include <QDebug>
#include <ostream>
namespace ClangBackEnd {
quint64 CompleteCodeMessage::ticketCounter = 0;
@@ -50,21 +48,5 @@ QDebug operator<<(QDebug debug, const CompleteCodeMessage &message)
return debug;
}
std::ostream &operator<<(std::ostream &os, const CompleteCodeMessage &message)
{
os << "("
<< message.m_filePath.constData() << ", "
<< message.m_line << ", "
<< message.m_column << ", "
<< message.m_projectPartId.constData() << ", "
<< message.m_ticketNumber << ", "
<< message.m_funcNameStartLine << ", "
<< message.m_funcNameStartColumn
<< ")";
return os;
}
} // namespace ClangBackEnd

View File

@@ -127,7 +127,6 @@ public:
}
friend CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const CompleteCodeMessage &message);
friend std::ostream &operator<<(std::ostream &os, const CompleteCodeMessage &message);
private:
Utf8String m_filePath;

View File

@@ -27,8 +27,6 @@
#include <QDebug>
#include <ostream>
namespace ClangBackEnd {
QDebug operator<<(QDebug debug, const EchoMessage &)
@@ -36,10 +34,5 @@ QDebug operator<<(QDebug debug, const EchoMessage &)
return debug.nospace() << "EchoMessage()";
}
std::ostream &operator<<(std::ostream &os, const EchoMessage &/*message*/)
{
return os << "()";
}
} // namespace ClangBackEnd

View File

@@ -29,8 +29,6 @@
#include "messageenvelop.h"
#include <iosfwd>
namespace ClangBackEnd {
class EchoMessage
@@ -71,7 +69,6 @@ private:
};
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const EchoMessage &message);
std::ostream &operator<<(std::ostream &os, const EchoMessage &message);
DECLARE_MESSAGE(EchoMessage)
} // namespace ClangBackEnd

View File

@@ -27,8 +27,6 @@
#include <QDebug>
#include <ostream>
namespace ClangBackEnd {
QDebug operator<<(QDebug debug, const EndMessage &/*message*/)
@@ -36,9 +34,4 @@ QDebug operator<<(QDebug debug, const EndMessage &/*message*/)
return debug.nospace() << "EndMessage()";
}
std::ostream &operator<<(std::ostream &os, const EndMessage &/*message*/)
{
return os << "()";
}
}

View File

@@ -29,8 +29,6 @@
#include <QDataStream>
#include <iosfwd>
namespace ClangBackEnd {
class EndMessage
@@ -53,7 +51,6 @@ public:
};
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const EndMessage &message);
std::ostream &operator<<(std::ostream &os, const EndMessage &message);
DECLARE_MESSAGE(EndMessage)
}

View File

@@ -27,9 +27,6 @@
#include <QDebug>
#include <algorithm>
#include <ostream>
namespace ClangBackEnd {
QDebug operator<<(QDebug debug, const RegisterProjectPartsForEditorMessage &message)
@@ -44,14 +41,5 @@ QDebug operator<<(QDebug debug, const RegisterProjectPartsForEditorMessage &mess
return debug;
}
std::ostream &operator<<(std::ostream &os, const RegisterProjectPartsForEditorMessage &message)
{
os << "("
<< message.projectContainers()
<< ")";
return os;
}
} // namespace ClangBackEnd

View File

@@ -70,7 +70,6 @@ private:
};
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const RegisterProjectPartsForEditorMessage &message);
std::ostream &operator<<(std::ostream &os, const RegisterProjectPartsForEditorMessage &message);
DECLARE_MESSAGE(RegisterProjectPartsForEditorMessage);
} // namespace ClangBackEnd

View File

@@ -27,8 +27,6 @@
#include <QDebug>
#include <ostream>
namespace ClangBackEnd {
QDebug operator<<(QDebug debug, const RegisterTranslationUnitForEditorMessage &message)
@@ -48,15 +46,5 @@ QDebug operator<<(QDebug debug, const RegisterTranslationUnitForEditorMessage &m
return debug;
}
std::ostream &operator<<(std::ostream &os, const RegisterTranslationUnitForEditorMessage &message)
{
os << "RegisterTranslationUnitForEditorMessage("
<< message.fileContainers() << ", "
<< message.currentEditorFilePath() << ", "
<< message.visibleEditorFilePaths() << ")";
return os;
}
} // namespace ClangBackEnd

View File

@@ -84,7 +84,6 @@ public:
&& first.visibleEditorFilePaths_ == second.visibleEditorFilePaths_;
}
friend std::ostream &operator<<(std::ostream &os, const RegisterTranslationUnitForEditorMessage &message);
private:
QVector<FileContainer> fileContainers_;
Utf8String currentEditorFilePath_;

View File

@@ -27,8 +27,6 @@
#include <QDebug>
#include <ostream>
namespace ClangBackEnd {
QDebug operator<<(QDebug debug, const UnregisterProjectPartsForEditorMessage &message)
@@ -43,14 +41,5 @@ QDebug operator<<(QDebug debug, const UnregisterProjectPartsForEditorMessage &me
return debug;
}
std::ostream &operator<<(std::ostream &os, const UnregisterProjectPartsForEditorMessage &message)
{
os << "("
<< message.projectPartIds()
<< ")";
return os;
}
} // namespace ClangBackEnd

View File

@@ -71,7 +71,6 @@ private:
};
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const UnregisterProjectPartsForEditorMessage &message);
std::ostream &operator<<(std::ostream &os, const UnregisterProjectPartsForEditorMessage &message);
DECLARE_MESSAGE(UnregisterProjectPartsForEditorMessage);
} // namespace ClangBackEnd

View File

@@ -27,8 +27,6 @@
#include <QDebug>
#include <ostream>
namespace ClangBackEnd {
QDebug operator<<(QDebug debug, const UnregisterTranslationUnitsForEditorMessage &message)
@@ -43,14 +41,5 @@ QDebug operator<<(QDebug debug, const UnregisterTranslationUnitsForEditorMessage
return debug;
}
std::ostream &operator<<(std::ostream &os, const UnregisterTranslationUnitsForEditorMessage &message)
{
os << "("
<< message.fileContainers()
<< ")";
return os;
}
} // namespace ClangBackEnd

View File

@@ -66,8 +66,6 @@ public:
return first.m_fileContainers == second.m_fileContainers;
}
friend std::ostream &operator<<(std::ostream &os, const UnregisterTranslationUnitsForEditorMessage &message);
private:
QVector<FileContainer> m_fileContainers;
};

View File

@@ -84,19 +84,6 @@ QDebug operator<<(QDebug debug, const CodeCompletion &message)
return debug;
}
std::ostream &operator<<(std::ostream &os, const CodeCompletion &message)
{
os << "("
<< message.m_text << ", "
<< message.m_priority << ", "
<< message.m_completionKind << ", "
<< message.m_availability << ", "
<< message.m_hasParameters
<< ")";
return os;
}
std::ostream &operator<<(std::ostream &os, const CodeCompletion::Kind kind)
{
return os << completionKindToString(kind);

View File

@@ -194,7 +194,6 @@ public:
}
friend CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const CodeCompletion &message);
friend std::ostream &operator<<(std::ostream &os, const CodeCompletion &message);
private:
Utf8String m_text;

View File

@@ -75,20 +75,6 @@ QDebug operator<<(QDebug debug, const CodeCompletionChunk &chunk)
return debug;
}
std::ostream &operator<<(std::ostream &os, const CodeCompletionChunk &chunk)
{
os << "("
<< chunk.kind() << ", "
<< chunk.text();
if (chunk.isOptional())
os << ", optional";
os << ")";
return os;
}
std::ostream &operator<<(std::ostream &os, const CodeCompletionChunk::Kind &kind)
{
return os << completionChunkKindToString(kind);

View File

@@ -127,7 +127,6 @@ private:
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const CodeCompletionChunk &chunk);
std::ostream &operator<<(std::ostream &os, const CodeCompletionChunk &chunk);
std::ostream &operator<<(std::ostream &os, const CodeCompletionChunk::Kind &kind);
} // namespace ClangBackEnd

View File

@@ -29,23 +29,8 @@
#include <QDebug>
#include <ostream>
namespace ClangBackEnd {
static const char *severityToText(DiagnosticSeverity severity)
{
switch (severity) {
case DiagnosticSeverity::Ignored: return "Ignored";
case DiagnosticSeverity::Note: return "Note";
case DiagnosticSeverity::Warning: return "Warning";
case DiagnosticSeverity::Error: return "Error";
case DiagnosticSeverity::Fatal: return "Fatal";
}
Q_UNREACHABLE();
}
QDebug operator<<(QDebug debug, const DiagnosticContainer &container)
{
debug.nospace() << "DiagnosticContainer("
@@ -62,20 +47,5 @@ QDebug operator<<(QDebug debug, const DiagnosticContainer &container)
return debug;
}
std::ostream &operator<<(std::ostream &os, const DiagnosticContainer &container)
{
os << "("
<< severityToText(container.severity()) << ": "
<< container.text() << ", "
<< container.category() << ", "
<< container.enableOption() << ", "
<< container.location() << ", "
<< container.ranges() << ", "
<< container.fixIts() << ", "
<< container.children() << ")";
return os;
}
} // namespace ClangBackEnd

View File

@@ -162,6 +162,5 @@ private:
};
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const DiagnosticContainer &container);
std::ostream &operator<<(std::ostream &os, const DiagnosticContainer &container);
} // namespace ClangBackEnd

View File

@@ -25,11 +25,8 @@
#include "documentannotationschangedmessage.h"
#include <QDataStream>
#include <QDebug>
#include <ostream>
namespace ClangBackEnd {
QDebug operator<<(QDebug debug, const DocumentAnnotationsChangedMessage &message)
@@ -45,18 +42,5 @@ QDebug operator<<(QDebug debug, const DocumentAnnotationsChangedMessage &message
return debug;
}
std::ostream &operator<<(std::ostream &os, const DocumentAnnotationsChangedMessage &message)
{
os << "DocumentAnnotationsChangedMessage("
<< message.fileContainer()
<< "," << message.diagnostics().size()
<< "," << !message.firstHeaderErrorDiagnostic().text().isEmpty()
<< "," << message.tokenInfos().size()
<< "," << message.skippedPreprocessorRanges().size()
<< ")";
return os;
}
} // namespace ClangBackEnd

View File

@@ -118,7 +118,6 @@ private:
};
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const DocumentAnnotationsChangedMessage &message);
std::ostream &operator<<(std::ostream &os, const DocumentAnnotationsChangedMessage &message);
DECLARE_MESSAGE(DocumentAnnotationsChangedMessage)
} // namespace ClangBackEnd

View File

@@ -37,14 +37,4 @@ QDebug operator<<(QDebug debug, const DynamicASTMatcherDiagnosticContainer &cont
return debug;
}
std::ostream &operator<<(std::ostream &os, const DynamicASTMatcherDiagnosticContainer &container)
{
os << "("
<< container.messages() << ", "
<< container.contexts()
<< ")";
return os;
}
} // namespace ClangBackEnd

View File

@@ -99,6 +99,5 @@ private:
using DynamicASTMatcherDiagnosticContainers = std::vector<DynamicASTMatcherDiagnosticContainer>;
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const DynamicASTMatcherDiagnosticContainer &container);
std::ostream &operator<<(std::ostream &os, const DynamicASTMatcherDiagnosticContainer &container);
} // namespace ClangBackEnd

View File

@@ -25,8 +25,6 @@
#include "dynamicastmatcherdiagnosticcontextcontainer.h"
namespace ClangBackEnd {
QDebug operator<<(QDebug debug, const DynamicASTMatcherDiagnosticContextContainer &container)
@@ -40,17 +38,6 @@ QDebug operator<<(QDebug debug, const DynamicASTMatcherDiagnosticContextContaine
return debug;
}
std::ostream &operator<<(std::ostream &os, const DynamicASTMatcherDiagnosticContextContainer &container)
{
os << "("
<< container.contextTypeText() << ", "
<< container.sourceRange() << ", "
<< container.arguments()
<< ")";
return os;
}
#define RETURN_CASE(name) \
case ClangQueryDiagnosticContextType::name: return #name;

View File

@@ -108,6 +108,5 @@ private:
using DynamicASTMatcherDiagnosticContextContainers = std::vector<DynamicASTMatcherDiagnosticContextContainer>;
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const DynamicASTMatcherDiagnosticContextContainer &container);
std::ostream &operator<<(std::ostream &os, const DynamicASTMatcherDiagnosticContextContainer &container);
} // namespace ClangBackEnd

View File

@@ -41,17 +41,6 @@ QDebug operator<<(QDebug debug, const DynamicASTMatcherDiagnosticMessageContaine
return debug;
}
std::ostream &operator<<(std::ostream &os, const DynamicASTMatcherDiagnosticMessageContainer &container)
{
os << "("
<< container.errorTypeText() << ", "
<< container.sourceRange() << ", "
<< container.arguments()
<< ")";
return os;
}
Utils::SmallString DynamicASTMatcherDiagnosticMessageContainer::errorTypeText() const
{
switch (m_errorType) {

View File

@@ -106,6 +106,5 @@ private:
using DynamicASTMatcherDiagnosticMessageContainers = std::vector<DynamicASTMatcherDiagnosticMessageContainer>;
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const DynamicASTMatcherDiagnosticMessageContainer &container);
std::ostream &operator<<(std::ostream &os, const DynamicASTMatcherDiagnosticMessageContainer &container);
} // namespace ClangBackEnd

View File

@@ -29,8 +29,6 @@
#include <QDebug>
#include <ostream>
namespace ClangBackEnd {
QDebug operator<<(QDebug debug, const FileContainer &container)
@@ -54,22 +52,5 @@ QDebug operator<<(QDebug debug, const FileContainer &container)
return debug;
}
std::ostream &operator<<(std::ostream &os, const FileContainer &container)
{
os << "("
<< container.filePath() << ", "
<< container.projectPartId() << ", "
<< container.fileArguments() << ", "
<< container.documentRevision();
if (container.hasUnsavedFileContent())
os << ", "
<< container.unsavedFileContent();
os << ")";
return os;
}
} // namespace ClangBackEnd

View File

@@ -147,6 +147,5 @@ private:
};
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const FileContainer &container);
std::ostream &operator<<(std::ostream &os, const FileContainer &container);
} // namespace ClangBackEnd

View File

@@ -40,21 +40,5 @@ QDebug operator<<(QDebug debug, const FileContainer &container)
return debug;
}
std::ostream &operator<<(std::ostream &os, const FileContainer &container)
{
os << "("
<< container.filePath() << ", "
<< container.commandLineArguments() << ", "
<< container.documentRevision();
if (container.unsavedFileContent().hasContent())
os << ", \""
<< container.unsavedFileContent();
os << "\")";
return os;
}
} // namespace V2
} // namespace ClangBackEnd

View File

@@ -130,7 +130,6 @@ private:
using FileContainers = std::vector<FileContainer>;
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const FileContainer &container);
std::ostream &operator<<(std::ostream &os, const FileContainer &container);
} // namespace V2
} // namespace ClangBackEnd

View File

@@ -136,11 +136,6 @@ public:
return in;
}
friend std::ostream &operator<<(std::ostream &out, const FilePath &filePath)
{
return out << "(" << filePath.path() << ", " << filePath.slashIndex() << ")";
}
friend bool operator==(const FilePath &first, const FilePath &second)
{
return first.m_path == second.m_path;

View File

@@ -27,8 +27,6 @@
#include <QDebug>
#include <ostream>
namespace ClangBackEnd {
QDebug operator<<(QDebug debug, const FixItContainer &container)
@@ -41,15 +39,5 @@ QDebug operator<<(QDebug debug, const FixItContainer &container)
return debug;
}
std::ostream &operator<<(std::ostream &os, const FixItContainer &container)
{
os << "("
<< container.text() << ", "
<< container.range()
<< ")";
return os;
}
} // namespace ClangBackEnd

View File

@@ -79,6 +79,5 @@ private:
};
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const FixItContainer &container);
std::ostream &operator<<(std::ostream &os, const FixItContainer &container);
} // namespace ClangBackEnd

View File

@@ -27,8 +27,6 @@
#include <QDebug>
#include <ostream>
namespace ClangBackEnd {
QDebug operator<<(QDebug debug, const FollowSymbolMessage &message)
@@ -43,15 +41,4 @@ QDebug operator<<(QDebug debug, const FollowSymbolMessage &message)
return debug;
}
std::ostream &operator<<(std::ostream &os, const FollowSymbolMessage &message)
{
os << "("
<< message.m_fileContainer << ", "
<< message.m_ticketNumber << ", "
<< message.m_sourceRange << ", "
<< ")";
return os;
}
} // namespace ClangBackEnd

View File

@@ -84,7 +84,6 @@ public:
}
friend CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const FollowSymbolMessage &message);
friend std::ostream &operator<<(std::ostream &os, const FollowSymbolMessage &message);
private:
FileContainer m_fileContainer;
SourceRangeContainer m_sourceRange;

View File

@@ -131,11 +131,6 @@ public:
return in;
}
friend std::ostream &operator<<(std::ostream &out, const NativeFilePath &filePath)
{
return out << "(" << filePath.path() << ", " << filePath.slashIndex() << ")";
}
friend bool operator==(const NativeFilePath &first, const NativeFilePath &second)
{
return first.m_path == second.m_path;

View File

@@ -36,13 +36,4 @@ CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const PrecompiledHeadersUpda
return debug;
}
std::ostream &operator<<(std::ostream &out, const PrecompiledHeadersUpdatedMessage &message)
{
out << "("
<< message.projectPartPchs()
<< ")";
return out;
}
} // namespace ClangBackEnd

View File

@@ -72,7 +72,6 @@ private:
};
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const PrecompiledHeadersUpdatedMessage &message);
std::ostream &operator<<(std::ostream &out, const PrecompiledHeadersUpdatedMessage &message);
DECLARE_MESSAGE(PrecompiledHeadersUpdatedMessage)

View File

@@ -29,8 +29,6 @@
#include <QDebug>
#include <ostream>
namespace ClangBackEnd {
namespace {
@@ -60,17 +58,5 @@ QDebug operator<<(QDebug debug, const ProjectPartContainer &container)
return debug;
}
std::ostream &operator<<(std::ostream &os, const ProjectPartContainer &container)
{
os << "("
<< container.projectPartId()
<< ","
<< container.arguments()
<< ")";
return os;
}
} // namespace ClangBackEnd

View File

@@ -81,6 +81,5 @@ private:
};
QDebug operator<<(QDebug debug, const ProjectPartContainer &container);
std::ostream &operator<<(std::ostream &os, const ProjectPartContainer &container);
} // namespace ClangBackEnd

View File

@@ -40,16 +40,5 @@ QDebug operator<<(QDebug debug, const ProjectPartContainer &container)
return debug;
}
std::ostream &operator<<(std::ostream &out, const ProjectPartContainer &container)
{
out << "("
<< container.projectPartId() << ", "
<< container.arguments() << ", "
<< container.headerPaths() << ", "
<< container.sourcePaths()<< ")";
return out;
}
} // namespace V2
} // namespace ClangBackEnd

View File

@@ -119,6 +119,5 @@ private:
using ProjectPartContainers = std::vector<ProjectPartContainer>;
QDebug operator<<(QDebug debug, const ProjectPartContainer &container);
std::ostream &operator<<(std::ostream &out, const ProjectPartContainer &container);
} // namespace V2
} // namespace ClangBackEnd

View File

@@ -36,13 +36,4 @@ QDebug operator<<(QDebug debug, const ProjectPartPch &projectPartPch)
return debug;
}
std::ostream &operator<<(std::ostream &out, const ProjectPartPch &projectPartPch)
{
out << "("
<< projectPartPch.id() << ", "
<< projectPartPch.path() << ")";
return out;
}
} // namespace ClangBackEnd

View File

@@ -84,5 +84,4 @@ private:
};
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const ProjectPartPch &projectPartPch);
std::ostream &operator<<(std::ostream &out, const ProjectPartPch &projectPartPch);
} // namespace ClangBackEnd

View File

@@ -27,8 +27,6 @@
#include <QDebug>
#include <ostream>
namespace ClangBackEnd {
QDebug operator<<(QDebug debug, const ReferencesMessage &message)
@@ -44,16 +42,4 @@ QDebug operator<<(QDebug debug, const ReferencesMessage &message)
return debug;
}
std::ostream &operator<<(std::ostream &os, const ReferencesMessage &message)
{
os << "("
<< message.m_fileContainer << ", "
<< message.m_ticketNumber << ", "
<< message.m_isLocalVariable << ", "
<< message.m_references << ", "
<< ")";
return os;
}
} // namespace ClangBackEnd

View File

@@ -97,7 +97,6 @@ public:
}
friend CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const ReferencesMessage &message);
friend std::ostream &operator<<(std::ostream &os, const ReferencesMessage &message);
private:
FileContainer m_fileContainer;

View File

@@ -27,8 +27,6 @@
#include <QDebug>
#include <ostream>
namespace ClangBackEnd {
QDebug operator<<(QDebug debug, const RegisterUnsavedFilesForEditorMessage &message)
@@ -43,14 +41,5 @@ QDebug operator<<(QDebug debug, const RegisterUnsavedFilesForEditorMessage &mess
return debug;
}
std::ostream &operator<<(std::ostream &os, const RegisterUnsavedFilesForEditorMessage &message)
{
os << "("
<< message.fileContainers()
<< ")";
return os;
}
} // namespace ClangBackEnd

View File

@@ -69,7 +69,6 @@ private:
};
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const RegisterUnsavedFilesForEditorMessage &message);
std::ostream &operator<<(std::ostream &os, const RegisterUnsavedFilesForEditorMessage &message);
DECLARE_MESSAGE(RegisterUnsavedFilesForEditorMessage);
} // namespace ClangBackEnd

View File

@@ -35,8 +35,4 @@ CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const RemovePchProjectPartsM
return debug;
}
std::ostream &operator<<(std::ostream &out, const RemovePchProjectPartsMessage &message)
{
return out << "(" << message.projectsPartIds() << ")";
}
} // namespace ClangBackEnd

View File

@@ -77,7 +77,6 @@ private:
};
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const RemovePchProjectPartsMessage &message);
std::ostream &operator<<(std::ostream &out, const RemovePchProjectPartsMessage &message);
DECLARE_MESSAGE(RemovePchProjectPartsMessage)

View File

@@ -27,8 +27,6 @@
#include <QDebug>
#include <ostream>
namespace ClangBackEnd {
QDebug operator<<(QDebug debug, const RequestDocumentAnnotationsMessage &message)
@@ -40,14 +38,4 @@ QDebug operator<<(QDebug debug, const RequestDocumentAnnotationsMessage &message
return debug;
}
std::ostream &operator<<(std::ostream &os, const RequestDocumentAnnotationsMessage &message)
{
os << "("
<< message.fileContainer().filePath() << ","
<< message.fileContainer().projectPartId()
<< ")";
return os;
}
} // namespace ClangBackEnd

View File

@@ -67,7 +67,6 @@ private:
};
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const RequestDocumentAnnotationsMessage &message);
std::ostream &operator<<(std::ostream &os, const RequestDocumentAnnotationsMessage &message);
DECLARE_MESSAGE(RequestDocumentAnnotationsMessage);
} // namespace ClangBackEnd

View File

@@ -27,8 +27,6 @@
#include <QDebug>
#include <ostream>
namespace ClangBackEnd {
quint64 RequestFollowSymbolMessage::ticketCounter = 0;
@@ -48,17 +46,4 @@ QDebug operator<<(QDebug debug, const RequestFollowSymbolMessage &message)
return debug;
}
std::ostream &operator<<(std::ostream &os, const RequestFollowSymbolMessage &message)
{
os << "("
<< message.m_fileContainer << ", "
<< message.m_dependentFiles << ", "
<< message.m_ticketNumber << ", "
<< message.m_line << ", "
<< message.m_column << ", "
<< ")";
return os;
}
} // namespace ClangBackEnd

View File

@@ -107,7 +107,6 @@ public:
}
friend CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const RequestFollowSymbolMessage &message);
friend std::ostream &operator<<(std::ostream &os, const RequestFollowSymbolMessage &message);
private:
FileContainer m_fileContainer;
quint64 m_ticketNumber = 0;

View File

@@ -27,8 +27,6 @@
#include <QDebug>
#include <ostream>
namespace ClangBackEnd {
quint64 RequestReferencesMessage::ticketCounter = 0;
@@ -48,17 +46,4 @@ QDebug operator<<(QDebug debug, const RequestReferencesMessage &message)
return debug;
}
std::ostream &operator<<(std::ostream &os, const RequestReferencesMessage &message)
{
os << "("
<< message.m_fileContainer << ", "
<< message.m_ticketNumber << ", "
<< message.m_line << ", "
<< message.m_column << ", "
<< message.m_local << ", "
<< ")";
return os;
}
} // namespace ClangBackEnd

View File

@@ -107,7 +107,6 @@ public:
}
friend CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const RequestReferencesMessage &message);
friend std::ostream &operator<<(std::ostream &os, const RequestReferencesMessage &message);
private:
FileContainer m_fileContainer;

View File

@@ -38,18 +38,4 @@ QDebug operator<<(QDebug debug, const RequestSourceLocationsForRenamingMessage &
return debug;
}
std::ostream &operator<<(std::ostream &os, const RequestSourceLocationsForRenamingMessage &message)
{
os << "("
<< message.filePath() << ", "
<< message.line() << ", "
<< message.column() << ", "
<< message.unsavedContent() << ", "
<< message.commandLine()
<< ")";
return os;
}
} // namespace ClangBackEnd

View File

@@ -133,7 +133,6 @@ private:
};
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const RequestSourceLocationsForRenamingMessage &message);
std::ostream &operator<<(std::ostream &os, const RequestSourceLocationsForRenamingMessage &message);
DECLARE_MESSAGE(RequestSourceLocationsForRenamingMessage)
} // namespace ClangBackEnd

View File

@@ -36,14 +36,4 @@ QDebug operator<<(QDebug debug, const RequestSourceRangesAndDiagnosticsForQueryM
return debug;
}
std::ostream &operator<<(std::ostream &os, const RequestSourceRangesAndDiagnosticsForQueryMessage &message)
{
os << "("
<< message.query() << ", "
<< message.source()
<< ")";
return os;
}
} // namespace ClangBackEnd

View File

@@ -94,7 +94,6 @@ private:
};
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const RequestSourceRangesAndDiagnosticsForQueryMessage &message);
std::ostream &operator<<(std::ostream &os, const RequestSourceRangesAndDiagnosticsForQueryMessage &message);
DECLARE_MESSAGE(RequestSourceRangesAndDiagnosticsForQueryMessage)
} // namespace ClangBackEnd

View File

@@ -35,14 +35,5 @@ QDebug operator<<(QDebug debug, const RequestSourceRangesForQueryMessage &messag
return debug;
}
std::ostream &operator<<(std::ostream &os, const RequestSourceRangesForQueryMessage &message)
{
os << "("
<< message.query()
<< ")";
return os;
}
} // namespace ClangBackEnd

View File

@@ -111,7 +111,6 @@ private:
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const RequestSourceRangesForQueryMessage &message);
std::ostream &operator<<(std::ostream &os, const RequestSourceRangesForQueryMessage &message);
DECLARE_MESSAGE(RequestSourceRangesForQueryMessage)
} // namespace ClangBackEnd

View File

@@ -28,8 +28,6 @@
#include <QDataStream>
#include <QDebug>
#include <ostream>
namespace ClangBackEnd {
SourceLocationContainer::SourceLocationContainer(const Utf8String &filePath,
@@ -97,15 +95,5 @@ QDebug operator<<(QDebug debug, const SourceLocationContainer &container)
return debug;
}
std::ostream &operator<<(std::ostream &os, const SourceLocationContainer &container)
{
os << "("
<< container.filePath() << ", "
<< container.line() << ", "
<< container.column()
<< ")";
return os;
}
} // namespace ClangBackEnd

View File

@@ -59,6 +59,5 @@ CLANGSUPPORT_EXPORT bool operator==(const SourceLocationContainer &first, const
CLANGSUPPORT_EXPORT bool operator!=(const SourceLocationContainer &first, const SourceLocationContainer &second);
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const SourceLocationContainer &container);
std::ostream &operator<<(std::ostream &os, const SourceLocationContainer &container);
} // namespace ClangBackEnd

View File

@@ -27,8 +27,6 @@
#include <QDebug>
#include <ostream>
namespace ClangBackEnd {
namespace V2 {
@@ -43,17 +41,5 @@ QDebug operator<<(QDebug debug, const SourceLocationContainer &container)
return debug;
}
std::ostream &operator<<(std::ostream &os, const SourceLocationContainer &container)
{
os << "(("
<< container.filePathId().directoryId << ", " << container.filePathId().fileNameId << "), "
<< container.line() << ", "
<< container.column() << ", "
<< container.offset()
<< ")";
return os;
}
} // namespace V2
} // namespace ClangBackEnd

View File

@@ -121,7 +121,6 @@ private:
};
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const SourceLocationContainer &container);
std::ostream &operator<<(std::ostream &os, const SourceLocationContainer &container);
} // namespace V2
} // namespace ClangBackEnd

View File

@@ -25,7 +25,7 @@
#include "sourcelocationscontainer.h"
#include <ostream>
#include <QDebug>
namespace ClangBackEnd {
@@ -44,13 +44,4 @@ QDebug operator<<(QDebug debug, const SourceLocationsContainer &container)
return debug;
}
std::ostream &operator<<(std::ostream &os, const SourceLocationsContainer &container)
{
os << "("
<< container.sourceLocationContainers()
<< ")";
return os;
}
} // namespace ClangBackEnd

View File

@@ -86,9 +86,7 @@ public:
std::vector<V2::SourceLocationContainer> m_sourceLocationContainers;
};
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const SourceLocationsContainer &container);
std::ostream &operator<<(std::ostream &os, const SourceLocationsContainer &container);
} // namespace ClangBackEnd

View File

@@ -36,15 +36,4 @@ QDebug operator<<(QDebug debug, const SourceLocationsForRenamingMessage &message
return debug;
}
std::ostream &operator<<(std::ostream &os, const SourceLocationsForRenamingMessage &message)
{
os << "("
<< message.symbolName() << ", "
<< message.textDocumentRevision() << ", "
<< message.sourceLocations()
<< ")";
return os;
}
} // namespace ClangBackEnd

View File

@@ -97,7 +97,6 @@ private:
};
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const SourceLocationsForRenamingMessage &message);
std::ostream &operator<<(std::ostream &os, const SourceLocationsForRenamingMessage &message);
DECLARE_MESSAGE(SourceLocationsForRenamingMessage)
} // namespace ClangBackEnd

View File

@@ -27,8 +27,6 @@
#include <QDebug>
#include <ostream>
namespace ClangBackEnd {
@@ -42,15 +40,5 @@ QDebug operator<<(QDebug debug, const SourceRangeContainer &container)
return debug;
}
std::ostream &operator<<(std::ostream &os, const SourceRangeContainer &container)
{
os << "("
<< container.start() << ", "
<< container.end()
<< ")";
return os;
}
} // namespace ClangBackEnd

View File

@@ -80,6 +80,5 @@ private:
};
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const SourceRangeContainer &container);
std::ostream &operator<<(std::ostream &os, const SourceRangeContainer &container);
} // namespace ClangBackEnd

View File

@@ -27,8 +27,6 @@
#include <QDebug>
#include <ostream>
namespace ClangBackEnd {
namespace V2 {
@@ -42,15 +40,5 @@ QDebug operator<<(QDebug debug, const SourceRangeContainer &container)
return debug;
}
std::ostream &operator<<(std::ostream &os, const SourceRangeContainer &container)
{
os << "("
<< container.start() << ", "
<< container.end()
<< ")";
return os;
}
} // namespace V2
} // namespace ClangBackEnd

View File

@@ -110,6 +110,5 @@ private:
using SourceRangeContainers = std::vector<SourceRangeContainer>;
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const SourceRangeContainer &container);
std::ostream &operator<<(std::ostream &os, const SourceRangeContainer &container);
} // namespace V2
} // namespace ClangBackEnd

View File

@@ -36,14 +36,4 @@ QDebug operator<<(QDebug debug, const SourceRangesAndDiagnosticsForQueryMessage
return debug;
}
std::ostream &operator<<(std::ostream &os, const SourceRangesAndDiagnosticsForQueryMessage &message)
{
os << "("
<< message.sourceRanges() << ", "
<< message.diagnostics()
<< ")";
return os;
}
} // namespace ClangBackEnd

View File

@@ -96,7 +96,6 @@ private:
};
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const SourceRangesAndDiagnosticsForQueryMessage &message);
std::ostream &operator<<(std::ostream &os, const SourceRangesAndDiagnosticsForQueryMessage &message);
DECLARE_MESSAGE(SourceRangesAndDiagnosticsForQueryMessage)

View File

@@ -43,13 +43,4 @@ QDebug operator<<(QDebug debug, const SourceRangesContainer &container)
return debug;
}
std::ostream &operator<<(std::ostream &os, const SourceRangesContainer &container)
{
os << "("
<< container.sourceRangeWithTextContainers()
<< ")";
return os;
}
} // namespace ClangBackEnd

View File

@@ -112,6 +112,5 @@ public:
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const SourceRangesContainer &container);
std::ostream &operator<<(std::ostream &os, const SourceRangesContainer &container);
} // namespace ClangBackEnd

View File

@@ -35,12 +35,4 @@ QDebug operator<<(QDebug debug, const SourceRangesForQueryMessage &message)
return debug;
}
std::ostream &operator<<(std::ostream &os, const SourceRangesForQueryMessage &message)
{
os << "("
<< message.sourceRanges()
<< ")";
return os;
}
} // namespace ClangBackEnd

View File

@@ -79,7 +79,6 @@ private:
};
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const SourceRangesForQueryMessage &message);
std::ostream &operator<<(std::ostream &os, const SourceRangesForQueryMessage &message);
DECLARE_MESSAGE(SourceRangesForQueryMessage)
} // namespace ClangBackEnd

View File

@@ -25,10 +25,6 @@
#include "sourcerangewithtextcontainer.h"
#ifdef UNIT_TESTS
#include <gtest/gtest.h>
#endif
namespace ClangBackEnd {
QDebug operator<<(QDebug debug, const SourceRangeWithTextContainer &container)
@@ -42,15 +38,4 @@ QDebug operator<<(QDebug debug, const SourceRangeWithTextContainer &container)
return debug;
}
std::ostream &operator<<(std::ostream &os, const SourceRangeWithTextContainer &container)
{
os << "("
<< container.start() << ", "
<< container.end() << ", "
<< container.text()
<< ")";
return os;
}
} // namespace ClangBackEnd

View File

@@ -113,6 +113,5 @@ private:
using SourceRangeWithTextContainers = std::vector<SourceRangeWithTextContainer>;
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const SourceRangeWithTextContainer &container);
std::ostream &operator<<(std::ostream &os, const SourceRangeWithTextContainer &container);
} // namespace ClangBackEnd

View File

@@ -27,8 +27,6 @@
#include <QDebug>
#include <ostream>
namespace ClangBackEnd {
#define RETURN_TEXT_FOR_CASE(enumValue) case HighlightingType::enumValue: return #enumValue
@@ -77,40 +75,4 @@ QDebug operator<<(QDebug debug, const TokenInfoContainer &container)
return debug;
}
std::ostream &operator<<(std::ostream &os, HighlightingType highlightingType)
{
return os << highlightingTypeToCStringLiteral(highlightingType);
}
std::ostream &operator<<(std::ostream &os, HighlightingTypes types)
{
os << "("
<< types.mainHighlightingType;
if (!types.mixinHighlightingTypes.empty())
os << ", "<< types.mixinHighlightingTypes;
os << ")";
return os;
}
std::ostream &operator<<(std::ostream &os, const TokenInfoContainer &container)
{
os << "("
<< container.line() << ", "
<< container.column() << ", "
<< container.length() << ", "
<< container.types() << ", "
<< container.token() << ", "
<< container.typeSpelling() << ", "
<< container.isIdentifier() << ", "
<< container.isIncludeDirectivePath() << ", "
<< container.isDeclaration() << ", "
<< container.isDefinition()
<< ")";
return os;
}
} // namespace ClangBackEnd

View File

@@ -31,9 +31,7 @@
#include <QDataStream>
#include <iosfwd>
#include <bitset>
namespace ClangBackEnd {
inline QDataStream &operator<<(QDataStream &out, HighlightingType highlightingType);
@@ -264,8 +262,5 @@ inline QDataStream &operator>>(QDataStream &in, ByteSizeBitset &bits)
}
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const TokenInfoContainer &container);
CLANGSUPPORT_EXPORT std::ostream &operator<<(std::ostream &os, HighlightingType highlightingType);
CLANGSUPPORT_EXPORT std::ostream &operator<<(std::ostream &os, HighlightingTypes types);
std::ostream &operator<<(std::ostream &os, const TokenInfoContainer &container);
} // namespace ClangBackEnd

View File

@@ -27,8 +27,6 @@
#include <QDebug>
#include <ostream>
namespace ClangBackEnd {
QDebug operator<<(QDebug debug, const UnregisterUnsavedFilesForEditorMessage &message)
@@ -43,14 +41,5 @@ QDebug operator<<(QDebug debug, const UnregisterUnsavedFilesForEditorMessage &me
return debug;
}
std::ostream &operator<<(std::ostream &os, const UnregisterUnsavedFilesForEditorMessage &message)
{
os << "("
<< message.fileContainers()
<< ")";
return os;
}
} // namespace ClangBackEnd

View File

@@ -70,7 +70,6 @@ private:
};
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const UnregisterUnsavedFilesForEditorMessage &message);
std::ostream &operator<<(std::ostream &os, const UnregisterUnsavedFilesForEditorMessage &message);
DECLARE_MESSAGE(UnregisterUnsavedFilesForEditorMessage)
} // namespace ClangBackEnd

View File

@@ -35,11 +35,4 @@ QDebug operator<<(QDebug debug, const UpdatePchProjectPartsMessage &message)
return debug;
}
std::ostream &operator<<(std::ostream &out, const UpdatePchProjectPartsMessage &message)
{
return out << "("
<< message.projectsParts()
<< ")";
}
} // namespace ClangBackEnd

View File

@@ -95,7 +95,6 @@ private:
};
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const UpdatePchProjectPartsMessage &message);
std::ostream &operator<<(std::ostream &out, const UpdatePchProjectPartsMessage &message);
DECLARE_MESSAGE(UpdatePchProjectPartsMessage)

View File

@@ -27,8 +27,6 @@
#include <QDebug>
#include <ostream>
namespace ClangBackEnd {
QDebug operator<<(QDebug debug, const UpdateTranslationUnitsForEditorMessage &message)
@@ -43,14 +41,5 @@ QDebug operator<<(QDebug debug, const UpdateTranslationUnitsForEditorMessage &me
return debug;
}
std::ostream &operator<<(std::ostream &os, const UpdateTranslationUnitsForEditorMessage &message)
{
os << "UpdateTranslationUnitsForEditorMessage("
<< message.fileContainers()
<< ")";
return os;
}
} // namespace ClangBackEnd

View File

@@ -69,7 +69,6 @@ private:
};
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const UpdateTranslationUnitsForEditorMessage &message);
std::ostream &operator<<(std::ostream &os, const UpdateTranslationUnitsForEditorMessage &message);
DECLARE_MESSAGE(UpdateTranslationUnitsForEditorMessage)
} // namespace ClangBackEnd

View File

@@ -27,10 +27,6 @@
#include <QDebug>
#include <algorithm>
#include <iterator>
#include <ostream>
namespace ClangBackEnd {
QDebug operator<<(QDebug debug, const UpdateVisibleTranslationUnitsMessage &message)
@@ -47,14 +43,4 @@ QDebug operator<<(QDebug debug, const UpdateVisibleTranslationUnitsMessage &mess
return debug;
}
std::ostream &operator<<(std::ostream &os, const UpdateVisibleTranslationUnitsMessage &message)
{
os << "("
<< message.currentEditorFilePath() << ", "
<< message.visibleEditorFilePaths()
<< ")";
return os;
}
} // namespace ClangBackEnd

View File

@@ -81,7 +81,6 @@ private:
};
CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const UpdateVisibleTranslationUnitsMessage &message);
std::ostream &operator<<(std::ostream &os, const UpdateVisibleTranslationUnitsMessage &message);
DECLARE_MESSAGE(UpdateVisibleTranslationUnitsMessage)
} // namespace ClangBackEnd

Some files were not shown because too many files have changed in this diff Show More