summaryrefslogtreecommitdiff
path: root/src/tools/clangbackend/ipcsource/clangdocument.cpp
diff options
context:
space:
mode:
authorMarco Bubke <marco.bubke@qt.io>2017-06-13 18:23:05 +0200
committerMarco Bubke <marco.bubke@qt.io>2017-06-29 08:58:19 +0000
commit1f18848ee76d2f385c261e4fe984db62204063d4 (patch)
treef60e849a7d2c3badaa71697e6a6ccc743a7869ba /src/tools/clangbackend/ipcsource/clangdocument.cpp
parent50790f61872b4b2fadf103f946561406b6732318 (diff)
downloadqt-creator-1f18848ee76d2f385c261e4fe984db62204063d4.tar.gz
Clang: Cleanup more PrintTo functions
Change-Id: If1389462479ae10b067904f05cf785c3d8fb9638 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Diffstat (limited to 'src/tools/clangbackend/ipcsource/clangdocument.cpp')
-rw-r--r--src/tools/clangbackend/ipcsource/clangdocument.cpp13
1 files changed, 8 insertions, 5 deletions
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