From 1f18848ee76d2f385c261e4fe984db62204063d4 Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Tue, 13 Jun 2017 18:23:05 +0200 Subject: Clang: Cleanup more PrintTo functions Change-Id: If1389462479ae10b067904f05cf785c3d8fb9638 Reviewed-by: David Schulz Reviewed-by: Nikolai Kosjar --- src/tools/clangbackend/ipcsource/clangdocument.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/tools/clangbackend/ipcsource/clangdocument.cpp') diff --git a/src/tools/clangbackend/ipcsource/clangdocument.cpp b/src/tools/clangbackend/ipcsource/clangdocument.cpp index 117a77a848..3cfcfabe09 100644 --- a/src/tools/clangbackend/ipcsource/clangdocument.cpp +++ b/src/tools/clangbackend/ipcsource/clangdocument.cpp @@ -423,12 +423,15 @@ bool operator==(const Document &first, const Document &second) && first.projectPart().id() == second.projectPart().id(); } -void PrintTo(const Document &document, ::std::ostream *os) +std::ostream &operator<<(std::ostream &os, const Document &document) { - *os << "Document(" - << document.filePath().constData() << ", " - << document.projectPart().id().constData() << ", " - << document.documentRevision() << ")"; + os << "(" + << document.filePath() << ", " + << document.projectPart().id() << ", " + << document.documentRevision() + << ")"; + + return os; } } // namespace ClangBackEnd -- cgit v1.2.1