aboutsummaryrefslogtreecommitdiffstats
path: root/src/tools/clangbackend/source/clangdocument.h
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2021-12-06 05:11:04 +0100
committerhjk <hjk@qt.io>2021-12-06 17:10:49 +0000
commit104ea4accc8bf7d2e317c10638a299c3af267ede (patch)
tree8ab53d49a45cb72372a5294d272a7e43c815d661 /src/tools/clangbackend/source/clangdocument.h
parent8cb5c3cfdd07f98449d3df0a676c5026c33f6b7a (diff)
Make some qHash and comparison operators overloads hidden friends
Restricts lookup scope more to necessary bits. Change-Id: Ia42c95aaa70534843b7f6a90bfc56d2a1202c612 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/tools/clangbackend/source/clangdocument.h')
-rw-r--r--src/tools/clangbackend/source/clangdocument.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tools/clangbackend/source/clangdocument.h b/src/tools/clangbackend/source/clangdocument.h
index bb2eb42ab4..a637731a6e 100644
--- a/src/tools/clangbackend/source/clangdocument.h
+++ b/src/tools/clangbackend/source/clangdocument.h
@@ -115,6 +115,9 @@ public:
= PreferredTranslationUnit::RecentlyParsed) const;
TranslationUnits &translationUnits() const;
+ friend bool operator==(const Document &first, const Document &second);
+ friend std::ostream &operator<<(std::ostream &os, const Document &document);
+
public: // for tests
void parse() const;
void reparse() const;
@@ -136,6 +139,4 @@ private:
mutable std::shared_ptr<DocumentData> d;
};
-bool operator==(const Document &first, const Document &second);
-std::ostream &operator<<(std::ostream &os, const Document &document);
} // namespace ClangBackEnd