| 
									
										
										
										
											2016-11-23 13:31:47 +01:00
										 |  |  | /****************************************************************************
 | 
					
						
							|  |  |  | ** | 
					
						
							|  |  |  | ** Copyright (C) 2016 The Qt Company Ltd. | 
					
						
							|  |  |  | ** Contact: https://www.qt.io/licensing/
 | 
					
						
							|  |  |  | ** | 
					
						
							|  |  |  | ** This file is part of Qt Creator. | 
					
						
							|  |  |  | ** | 
					
						
							|  |  |  | ** Commercial License Usage | 
					
						
							|  |  |  | ** Licensees holding valid commercial Qt licenses may use this file in | 
					
						
							|  |  |  | ** accordance with the commercial license agreement provided with the | 
					
						
							|  |  |  | ** Software or, alternatively, in accordance with the terms contained in | 
					
						
							|  |  |  | ** a written agreement between you and The Qt Company. For licensing terms | 
					
						
							|  |  |  | ** and conditions see https://www.qt.io/terms-conditions. For further
 | 
					
						
							|  |  |  | ** information use the contact form at https://www.qt.io/contact-us.
 | 
					
						
							|  |  |  | ** | 
					
						
							|  |  |  | ** GNU General Public License Usage | 
					
						
							|  |  |  | ** Alternatively, this file may be used under the terms of the GNU | 
					
						
							|  |  |  | ** General Public License version 3 as published by the Free Software | 
					
						
							|  |  |  | ** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT | 
					
						
							|  |  |  | ** included in the packaging of this file. Please review the following | 
					
						
							|  |  |  | ** information to ensure the GNU General Public License requirements will | 
					
						
							|  |  |  | ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
 | 
					
						
							|  |  |  | ** | 
					
						
							|  |  |  | ****************************************************************************/ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include "gtest-creator-printing.h"
 | 
					
						
							| 
									
										
										
										
											2020-06-10 13:50:35 +02:00
										 |  |  | #include "gtest-std-printing.h"
 | 
					
						
							| 
									
										
										
										
											2016-11-23 13:31:47 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-10-18 13:38:58 +02:00
										 |  |  | #include "gtest-qt-printing.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-11-23 13:31:47 +01:00
										 |  |  | #include <gtest/gtest-printers.h>
 | 
					
						
							| 
									
										
										
										
											2018-08-21 11:54:51 +02:00
										 |  |  | #include <gmock/gmock-matchers.h>
 | 
					
						
							| 
									
										
										
										
											2016-11-23 13:31:47 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-09-21 11:43:59 +02:00
										 |  |  | #include <sourcelocations.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-10-25 11:08:39 +02:00
										 |  |  | #include <builddependency.h>
 | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | #include <clangcodemodelclientmessages.h>
 | 
					
						
							|  |  |  | #include <clangcodemodelservermessages.h>
 | 
					
						
							| 
									
										
										
										
											2017-09-21 11:43:59 +02:00
										 |  |  | #include <clangpathwatcher.h>
 | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | #include <clangrefactoringmessages.h>
 | 
					
						
							| 
									
										
										
										
											2020-04-27 20:01:38 +02:00
										 |  |  | #include <clangtools/clangtoolsdiagnostic.h>
 | 
					
						
							| 
									
										
										
										
											2019-08-22 16:10:38 +02:00
										 |  |  | #include <coreplugin/find/searchresultitem.h>
 | 
					
						
							|  |  |  | #include <coreplugin/locator/ilocatorfilter.h>
 | 
					
						
							|  |  |  | #include <cpptools/usages.h>
 | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | #include <filepath.h>
 | 
					
						
							| 
									
										
										
										
											2019-02-14 15:33:00 +01:00
										 |  |  | #include <filepathcaching.h>
 | 
					
						
							| 
									
										
										
										
											2019-04-10 19:24:36 +02:00
										 |  |  | #include <filepathview.h>
 | 
					
						
							|  |  |  | #include <filestatus.h>
 | 
					
						
							| 
									
										
										
										
											2018-12-17 12:06:57 +01:00
										 |  |  | #include <includesearchpath.h>
 | 
					
						
							| 
									
										
										
										
											2020-06-18 19:46:01 +02:00
										 |  |  | #include <modelnode.h>
 | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | #include <nativefilepath.h>
 | 
					
						
							| 
									
										
										
										
											2019-04-10 19:24:36 +02:00
										 |  |  | #include <pchpaths.h>
 | 
					
						
							| 
									
										
										
										
											2018-10-24 16:46:41 +02:00
										 |  |  | #include <pchtask.h>
 | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | #include <precompiledheadersupdatedmessage.h>
 | 
					
						
							| 
									
										
										
										
											2019-08-22 16:10:38 +02:00
										 |  |  | #include <projectexplorer/headerpath.h>
 | 
					
						
							|  |  |  | #include <projectexplorer/projectmacro.h>
 | 
					
						
							| 
									
										
										
										
											2018-02-07 16:11:28 +01:00
										 |  |  | #include <projectpartartefact.h>
 | 
					
						
							| 
									
										
										
										
											2019-04-10 19:24:36 +02:00
										 |  |  | #include <projectpartentry.h>
 | 
					
						
							| 
									
										
										
										
											2019-05-22 12:26:58 +02:00
										 |  |  | #include <projectpartpch.h>
 | 
					
						
							| 
									
										
										
										
											2018-01-31 13:53:57 +01:00
										 |  |  | #include <sourcedependency.h>
 | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | #include <sourcelocationentry.h>
 | 
					
						
							|  |  |  | #include <sourcelocationscontainer.h>
 | 
					
						
							| 
									
										
										
										
											2020-05-27 23:48:03 +02:00
										 |  |  | #include <sqlitesessionchangeset.h>
 | 
					
						
							| 
									
										
										
										
											2020-04-27 20:01:38 +02:00
										 |  |  | #include <sqlitevalue.h>
 | 
					
						
							| 
									
										
										
										
											2019-04-10 19:24:36 +02:00
										 |  |  | #include <symbol.h>
 | 
					
						
							| 
									
										
										
										
											2018-03-22 17:46:43 +01:00
										 |  |  | #include <symbolentry.h>
 | 
					
						
							| 
									
										
										
										
											2018-08-22 17:20:08 +02:00
										 |  |  | #include <symbolindexertaskqueue.h>
 | 
					
						
							| 
									
										
										
										
											2018-12-17 12:06:57 +01:00
										 |  |  | #include <toolchainargumentscache.h>
 | 
					
						
							| 
									
										
										
										
											2019-04-10 19:24:36 +02:00
										 |  |  | #include <tooltipinfo.h>
 | 
					
						
							| 
									
										
										
										
											2018-01-25 15:20:47 +01:00
										 |  |  | #include <usedmacro.h>
 | 
					
						
							| 
									
										
										
										
											2019-08-22 16:10:38 +02:00
										 |  |  | #include <utils/link.h>
 | 
					
						
							| 
									
										
										
										
											2020-06-18 19:46:01 +02:00
										 |  |  | #include <variantproperty.h>
 | 
					
						
							| 
									
										
										
										
											2020-09-16 13:44:43 +02:00
										 |  |  | #include <qmldesigner/designercore/imagecache/imagecachestorageinterface.h>
 | 
					
						
							| 
									
										
										
										
											2017-09-21 11:43:59 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-07 09:19:39 +02:00
										 |  |  | #include <sqlite.h>
 | 
					
						
							| 
									
										
										
										
											2020-05-27 23:48:03 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-12 19:27:51 +01:00
										 |  |  | namespace { | 
					
						
							|  |  |  | ClangBackEnd::FilePathCaching *filePathCache = nullptr; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-28 22:07:28 +01:00
										 |  |  | void PrintTo(const Utf8String &text, ::std::ostream *os) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     *os << text; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-11-23 13:31:47 +01:00
										 |  |  | namespace Core { | 
					
						
							| 
									
										
										
										
											2018-04-09 13:30:30 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const LocatorFilterEntry &entry) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     out << "(" | 
					
						
							|  |  |  |         << entry.displayName << ", "; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     if (entry.internalData.canConvert<ClangRefactoring::Symbol>()) | 
					
						
							|  |  |  |         out << entry.internalData.value<ClangRefactoring::Symbol>(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     out << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return out; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-11-23 13:31:47 +01:00
										 |  |  | namespace Search { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | using testing::PrintToString; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class TextPosition; | 
					
						
							|  |  |  | class TextRange; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | void PrintTo(const TextPosition &position, ::std::ostream *os) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     *os << "(" | 
					
						
							|  |  |  |         << position.line << ", " | 
					
						
							| 
									
										
										
										
											2020-07-10 12:32:06 +02:00
										 |  |  |         << position.column << ")"; | 
					
						
							| 
									
										
										
										
											2016-11-23 13:31:47 +01:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | void PrintTo(const TextRange &range, ::std::ostream *os) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     *os << "(" | 
					
						
							|  |  |  |         << PrintToString(range.begin) << ", " | 
					
						
							|  |  |  |         << PrintToString(range.end) << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-09-21 11:43:59 +02:00
										 |  |  | } // namespace Search
 | 
					
						
							|  |  |  | } // namespace Core
 | 
					
						
							| 
									
										
										
										
											2017-02-07 15:00:38 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | namespace ProjectExplorer { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static const char *typeToString(const MacroType &type) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     switch (type) { | 
					
						
							|  |  |  |         case MacroType::Invalid: return "MacroType::Invalid"; | 
					
						
							|  |  |  |         case MacroType::Define: return "MacroType::Define"; | 
					
						
							|  |  |  |         case MacroType::Undefine: return  "MacroType::Undefine"; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return ""; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const MacroType &type) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     out << typeToString(type); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return out; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const Macro ¯o) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     out << "(" | 
					
						
							|  |  |  |         << macro.key.data() << ", " | 
					
						
							|  |  |  |         << macro.value.data() << ", " | 
					
						
							|  |  |  |         << macro.type << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   return out; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-12-10 12:07:15 +01:00
										 |  |  | static const char *typeToString(const HeaderPathType &type) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     switch (type) { | 
					
						
							|  |  |  |     case HeaderPathType::User: | 
					
						
							|  |  |  |         return "User"; | 
					
						
							|  |  |  |     case HeaderPathType::System: | 
					
						
							|  |  |  |         return "System"; | 
					
						
							|  |  |  |     case HeaderPathType::BuiltIn: | 
					
						
							|  |  |  |         return "BuiltIn"; | 
					
						
							|  |  |  |     case HeaderPathType::Framework: | 
					
						
							|  |  |  |         return "Framework"; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return ""; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const HeaderPathType &headerPathType) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << "HeaderPathType::" << typeToString(headerPathType); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const HeaderPath &headerPath) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << "(" << headerPath.path << ", " << headerPath.type << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-09-21 11:43:59 +02:00
										 |  |  | } // namespace ProjectExplorer
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace Utils { | 
					
						
							| 
									
										
										
										
											2018-01-22 14:21:01 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const LineColumn &lineColumn) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << "(" << lineColumn.line << ", " << lineColumn.column << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-22 16:10:38 +02:00
										 |  |  | std::ostream &operator<<(std::ostream &out, const Link &link) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << "(" << link.targetFileName << ", " << link.targetLine << ", " << link.targetColumn | 
					
						
							|  |  |  |                << ", " << link.linkTextStart << ", " << link.linkTextEnd << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-12-17 12:06:57 +01:00
										 |  |  | const char * toText(Utils::Language language) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     using Utils::Language; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     switch (language) { | 
					
						
							|  |  |  |     case Language::C: | 
					
						
							|  |  |  |         return "C"; | 
					
						
							|  |  |  |     case Language::Cxx: | 
					
						
							|  |  |  |         return "Cxx"; | 
					
						
							| 
									
										
										
										
											2019-03-19 17:00:03 +01:00
										 |  |  |     case Language::None: | 
					
						
							|  |  |  |         return "None"; | 
					
						
							| 
									
										
										
										
											2018-12-17 12:06:57 +01:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return ""; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const Utils::Language &language) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << "Utils::" << toText(language); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | const char * toText(Utils::LanguageVersion languageVersion) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     using Utils::LanguageVersion; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     switch (languageVersion) { | 
					
						
							|  |  |  |     case LanguageVersion::C11: | 
					
						
							|  |  |  |         return "C11"; | 
					
						
							|  |  |  |     case LanguageVersion::C18: | 
					
						
							|  |  |  |         return "C18"; | 
					
						
							|  |  |  |     case LanguageVersion::C89: | 
					
						
							|  |  |  |         return "C89"; | 
					
						
							|  |  |  |     case LanguageVersion::C99: | 
					
						
							|  |  |  |         return "C99"; | 
					
						
							|  |  |  |     case LanguageVersion::CXX03: | 
					
						
							|  |  |  |         return "CXX03"; | 
					
						
							|  |  |  |     case LanguageVersion::CXX11: | 
					
						
							|  |  |  |         return "CXX11"; | 
					
						
							|  |  |  |     case LanguageVersion::CXX14: | 
					
						
							|  |  |  |         return "CXX14"; | 
					
						
							|  |  |  |     case LanguageVersion::CXX17: | 
					
						
							|  |  |  |         return "CXX17"; | 
					
						
							|  |  |  |     case LanguageVersion::CXX2a: | 
					
						
							|  |  |  |         return "CXX2a"; | 
					
						
							|  |  |  |     case LanguageVersion::CXX98: | 
					
						
							|  |  |  |         return "CXX98"; | 
					
						
							| 
									
										
										
										
											2019-03-19 17:00:03 +01:00
										 |  |  |     case LanguageVersion::None: | 
					
						
							|  |  |  |         return "None"; | 
					
						
							| 
									
										
										
										
											2018-12-17 12:06:57 +01:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return ""; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const Utils::LanguageVersion &languageVersion) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |      return out << "Utils::" << toText(languageVersion); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | const std::string toText(Utils::LanguageExtension extension, std::string prefix = {}) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     std::stringstream out; | 
					
						
							|  |  |  |     using Utils::LanguageExtension; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     if (extension == LanguageExtension::None) { | 
					
						
							|  |  |  |         out << prefix << "None"; | 
					
						
							|  |  |  |     } else if (extension == LanguageExtension::All) { | 
					
						
							|  |  |  |         out << prefix << "All"; | 
					
						
							|  |  |  |     } else { | 
					
						
							|  |  |  |         std::string split = ""; | 
					
						
							|  |  |  |         if (extension == LanguageExtension::Gnu) { | 
					
						
							|  |  |  |             out << prefix << "Gnu"; | 
					
						
							|  |  |  |             split = " | "; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |         if (extension == LanguageExtension::Microsoft) { | 
					
						
							|  |  |  |             out << split << prefix << "Microsoft"; | 
					
						
							|  |  |  |             split = " | "; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |         if (extension == LanguageExtension::Borland) { | 
					
						
							|  |  |  |             out << split << prefix << "Borland"; | 
					
						
							|  |  |  |             split = " | "; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |         if (extension == LanguageExtension::OpenMP) { | 
					
						
							|  |  |  |             out << split << prefix << "OpenMP"; | 
					
						
							|  |  |  |             split = " | "; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |         if (extension == LanguageExtension::ObjectiveC) { | 
					
						
							|  |  |  |             out << split << prefix << "ObjectiveC"; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return out.str(); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const Utils::LanguageExtension &languageExtension) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << toText(languageExtension, "Utils::"); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-08-07 19:01:01 +02:00
										 |  |  | void PrintTo(Utils::SmallStringView text, ::std::ostream *os) | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2018-09-03 14:38:01 +02:00
										 |  |  |     *os << "\"" << text << "\""; | 
					
						
							| 
									
										
										
										
											2018-08-07 19:01:01 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-09-21 11:43:59 +02:00
										 |  |  | void PrintTo(const Utils::SmallString &text, ::std::ostream *os) | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2018-09-03 14:38:01 +02:00
										 |  |  |     *os << "\"" << text << "\""; | 
					
						
							| 
									
										
										
										
											2017-09-21 11:43:59 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-28 22:07:28 +01:00
										 |  |  | void PrintTo(const Utils::PathString &text, ::std::ostream *os) | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2018-09-03 14:38:01 +02:00
										 |  |  |     *os << "\"" << text << "\""; | 
					
						
							| 
									
										
										
										
											2017-12-28 22:07:28 +01:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-09-21 11:43:59 +02:00
										 |  |  | } // namespace Utils
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-04-27 20:01:38 +02:00
										 |  |  | namespace Sqlite { | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const Value &value) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     out << "("; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     switch (value.type()) { | 
					
						
							|  |  |  |     case Sqlite::ValueType::Integer: | 
					
						
							|  |  |  |         out << value.toInteger(); | 
					
						
							|  |  |  |         break; | 
					
						
							|  |  |  |     case Sqlite::ValueType::Float: | 
					
						
							|  |  |  |         out << value.toFloat(); | 
					
						
							|  |  |  |         break; | 
					
						
							|  |  |  |     case Sqlite::ValueType::String: | 
					
						
							|  |  |  |         out << "\"" << value.toStringView() << "\""; | 
					
						
							|  |  |  |         break; | 
					
						
							| 
									
										
										
										
											2020-06-09 17:31:06 +02:00
										 |  |  |     case Sqlite::ValueType::Null: | 
					
						
							|  |  |  |         out << "null"; | 
					
						
							|  |  |  |         break; | 
					
						
							| 
									
										
										
										
											2020-04-27 20:01:38 +02:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return out << ")"; | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2020-05-27 23:48:03 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-27 15:09:25 +01:00
										 |  |  | std::ostream &operator<<(std::ostream &out, const ValueView &value) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     out << "("; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     switch (value.type()) { | 
					
						
							|  |  |  |     case Sqlite::ValueType::Integer: | 
					
						
							|  |  |  |         out << value.toInteger(); | 
					
						
							|  |  |  |         break; | 
					
						
							|  |  |  |     case Sqlite::ValueType::Float: | 
					
						
							|  |  |  |         out << value.toFloat(); | 
					
						
							|  |  |  |         break; | 
					
						
							|  |  |  |     case Sqlite::ValueType::String: | 
					
						
							|  |  |  |         out << "\"" << value.toStringView() << "\""; | 
					
						
							|  |  |  |         break; | 
					
						
							|  |  |  |     case Sqlite::ValueType::Null: | 
					
						
							|  |  |  |         out << "null"; | 
					
						
							|  |  |  |         break; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return out << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-05-27 23:48:03 +02:00
										 |  |  | namespace { | 
					
						
							|  |  |  | Utils::SmallStringView operationText(int operation) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     switch (operation) { | 
					
						
							|  |  |  |     case SQLITE_INSERT: | 
					
						
							|  |  |  |         return "INSERT"; | 
					
						
							|  |  |  |     case SQLITE_UPDATE: | 
					
						
							|  |  |  |         return "UPDATE"; | 
					
						
							|  |  |  |     case SQLITE_DELETE: | 
					
						
							|  |  |  |         return "DELETE"; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return {}; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, sqlite3_changeset_iter *iter) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     out << "("; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     const char *tableName = nullptr; | 
					
						
							|  |  |  |     int columns = 0; | 
					
						
							|  |  |  |     int operation = 0; | 
					
						
							|  |  |  |     sqlite3_value *value = nullptr; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     sqlite3changeset_op(iter, &tableName, &columns, &operation, 0); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     out << operationText(operation) << " " << tableName << " {"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     if (operation == SQLITE_UPDATE || operation == SQLITE_DELETE) { | 
					
						
							|  |  |  |         out << "Old: ["; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         for (int i = 0; i < columns; i++) { | 
					
						
							|  |  |  |             sqlite3changeset_old(iter, i, &value); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             if (value) | 
					
						
							|  |  |  |                 out << " " << sqlite3_value_text(value); | 
					
						
							|  |  |  |             else | 
					
						
							|  |  |  |                 out << " -"; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |         out << "]"; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     if (operation == SQLITE_UPDATE) | 
					
						
							|  |  |  |         out << ", "; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     if (operation == SQLITE_UPDATE || operation == SQLITE_INSERT) { | 
					
						
							|  |  |  |         out << "New: ["; | 
					
						
							|  |  |  |         for (int i = 0; i < columns; i++) { | 
					
						
							|  |  |  |             sqlite3changeset_new(iter, i, &value); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             if (value) | 
					
						
							|  |  |  |                 out << " " << sqlite3_value_text(value); | 
					
						
							|  |  |  |             else | 
					
						
							|  |  |  |                 out << " -"; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |         out << "]"; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     out << "})"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return out; | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2020-11-05 18:12:26 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | const char *toText(Operation operation) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     switch (operation) { | 
					
						
							|  |  |  |     case Operation::Invalid: | 
					
						
							|  |  |  |         return "Invalid"; | 
					
						
							|  |  |  |     case Operation::Insert: | 
					
						
							|  |  |  |         return "Invalid"; | 
					
						
							|  |  |  |     case Operation::Update: | 
					
						
							|  |  |  |         return "Invalid"; | 
					
						
							|  |  |  |     case Operation::Delete: | 
					
						
							|  |  |  |         return "Invalid"; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return ""; | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2020-05-27 23:48:03 +02:00
										 |  |  | } // namespace
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const SessionChangeSet &changeset) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     sqlite3_changeset_iter *iter = nullptr; | 
					
						
							| 
									
										
										
										
											2020-10-27 15:09:25 +01:00
										 |  |  |     sqlite3changeset_start(&iter, changeset.size(), const_cast<void *>(changeset.data())); | 
					
						
							| 
									
										
										
										
											2020-05-27 23:48:03 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     out << "ChangeSets(["; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     if (SQLITE_ROW == sqlite3changeset_next(iter)) { | 
					
						
							|  |  |  |         out << iter; | 
					
						
							|  |  |  |         while (SQLITE_ROW == sqlite3changeset_next(iter)) | 
					
						
							|  |  |  |             out << ", " << iter; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     sqlite3changeset_finalize(iter); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     out << "])"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return out; | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2020-10-27 15:09:25 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-11-05 18:12:26 +01:00
										 |  |  | std::ostream &operator<<(std::ostream &out, Operation operation) | 
					
						
							| 
									
										
										
										
											2020-10-27 15:09:25 +01:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2020-11-05 18:12:26 +01:00
										 |  |  |     return out << toText(operation); | 
					
						
							| 
									
										
										
										
											2020-10-27 15:09:25 +01:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-11-05 18:12:26 +01:00
										 |  |  | namespace SessionChangeSetInternal { | 
					
						
							|  |  |  | namespace { | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-27 15:09:25 +01:00
										 |  |  | const char *toText(State state) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     switch (state) { | 
					
						
							|  |  |  |     case State::Invalid: | 
					
						
							|  |  |  |         return "Invalid"; | 
					
						
							|  |  |  |     case State::Row: | 
					
						
							|  |  |  |         return "Row"; | 
					
						
							|  |  |  |     case State::Done: | 
					
						
							|  |  |  |         return "Done"; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return ""; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | } // namespace
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, SentinelIterator) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << "sentinel"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, State state) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << toText(state); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const Tuple &tuple) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << "(" << tuple.operation << ", " << tuple.columnCount << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const ValueViews &valueViews) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << "(" << valueViews.newValue << ", " << valueViews.oldValue << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const ConstIterator &iterator) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << "(" << (*iterator) << ", " << iterator.state() << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const ConstTupleIterator &iterator) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     auto value = *iterator; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return out << "(" << value.newValue << ", " << value.newValue << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | } // namespace SessionChangeSetInternal
 | 
					
						
							| 
									
										
										
										
											2020-04-27 20:01:38 +02:00
										 |  |  | } // namespace Sqlite
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-09-21 11:43:59 +02:00
										 |  |  | namespace ClangBackEnd { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const FilePathId &id) | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2018-11-12 19:27:51 +01:00
										 |  |  |     if (filePathCache) | 
					
						
							|  |  |  |         return out << "(" << id.filePathId << ", " << filePathCache->filePath(id) << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return out << id.filePathId; | 
					
						
							| 
									
										
										
										
											2017-09-21 11:43:59 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-27 20:44:34 +01:00
										 |  |  | std::ostream &operator<<(std::ostream &out, const FilePathView &filePathView) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << "(" << filePathView.toStringView() << ", " << filePathView.slashIndex() << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const NativeFilePathView &nativeFilePathView) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << "(" << nativeFilePathView.toStringView() << ", " << nativeFilePathView.slashIndex() << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-09-21 11:43:59 +02:00
										 |  |  | std::ostream &operator<<(std::ostream &out, const IdPaths &idPaths) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     out << "(" | 
					
						
							|  |  |  |         << idPaths.id << ", " | 
					
						
							|  |  |  |         << idPaths.filePathIds << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return out; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-04-09 13:30:30 +02:00
										 |  |  | #define RETURN_TEXT_FOR_CASE(enumValue) case SourceLocationKind::enumValue: return #enumValue
 | 
					
						
							|  |  |  | static const char *symbolTypeToCStringLiteral(ClangBackEnd::SourceLocationKind kind) | 
					
						
							| 
									
										
										
										
											2018-01-22 14:21:01 +01:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2018-04-09 13:30:30 +02:00
										 |  |  |     switch (kind) { | 
					
						
							|  |  |  |     RETURN_TEXT_FOR_CASE(None); | 
					
						
							|  |  |  |     RETURN_TEXT_FOR_CASE(Declaration); | 
					
						
							|  |  |  |     RETURN_TEXT_FOR_CASE(DeclarationReference); | 
					
						
							|  |  |  |     RETURN_TEXT_FOR_CASE(Definition); | 
					
						
							|  |  |  |     RETURN_TEXT_FOR_CASE(MacroDefinition); | 
					
						
							|  |  |  |     RETURN_TEXT_FOR_CASE(MacroUsage); | 
					
						
							|  |  |  |     RETURN_TEXT_FOR_CASE(MacroUndefinition); | 
					
						
							| 
									
										
										
										
											2018-01-22 14:21:01 +01:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return ""; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | #undef RETURN_TEXT_FOR_CASE
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-09-21 11:43:59 +02:00
										 |  |  | std::ostream &operator<<(std::ostream &out, const SourceLocationEntry &entry) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     out << "(" | 
					
						
							| 
									
										
										
										
											2018-01-22 14:21:01 +01:00
										 |  |  |         << entry.symbolId << ", " | 
					
						
							| 
									
										
										
										
											2017-09-21 11:43:59 +02:00
										 |  |  |         << entry.filePathId << ", " | 
					
						
							| 
									
										
										
										
											2018-01-22 14:21:01 +01:00
										 |  |  |         << entry.lineColumn << ", " | 
					
						
							| 
									
										
										
										
											2018-04-09 13:30:30 +02:00
										 |  |  |         << symbolTypeToCStringLiteral(entry.kind) << ")"; | 
					
						
							| 
									
										
										
										
											2017-09-21 11:43:59 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     return out; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const WatcherEntry &entry) | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2019-06-20 18:34:02 +02:00
										 |  |  |     out << "(" << entry.directoryPathId << ", " << entry.filePathId << ", " << entry.id << ", " | 
					
						
							|  |  |  |         << entry.lastModified << ", " | 
					
						
							| 
									
										
										
										
											2017-09-21 11:43:59 +02:00
										 |  |  |         << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return out; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | std::ostream &operator<<(std::ostream &os, const SourceLocationsContainer &container) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     os << "(" | 
					
						
							|  |  |  |        << container.sourceLocationContainers() | 
					
						
							|  |  |  |        << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-06-01 10:46:20 +02:00
										 |  |  | std::ostream &operator<<(std::ostream &os, const FollowSymbolResult &result) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     os << "(" | 
					
						
							|  |  |  |        << result.range | 
					
						
							| 
									
										
										
										
											2018-06-07 14:23:07 +02:00
										 |  |  |        << ", " << result.isResultOnlyForFallBack | 
					
						
							| 
									
										
										
										
											2018-06-01 10:46:20 +02:00
										 |  |  |        << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | std::ostream &operator<<(std::ostream &os, const FollowSymbolMessage &message) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |       os << "(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |          << message.fileContainer << ", " | 
					
						
							|  |  |  |          << message.ticketNumber << ", " | 
					
						
							| 
									
										
										
										
											2018-06-01 10:46:20 +02:00
										 |  |  |          << message.result << ", " | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |          << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-05-31 15:21:53 +02:00
										 |  |  | std::ostream &operator<<(std::ostream &os, const RequestCompletionsMessage &message) | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | { | 
					
						
							|  |  |  |     os << "(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |        << message.filePath << ", " | 
					
						
							|  |  |  |        << message.line << ", " | 
					
						
							|  |  |  |        << message.column << ", " | 
					
						
							|  |  |  |        << message.ticketNumber << ", " | 
					
						
							|  |  |  |        << message.funcNameStartLine << ", " | 
					
						
							|  |  |  |        << message.funcNameStartColumn | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |        << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |      return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-05-31 15:21:53 +02:00
										 |  |  | std::ostream &operator<<(std::ostream &os, const DocumentsOpenedMessage &message) | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2018-05-31 15:21:53 +02:00
										 |  |  |     os << "DocumentsOpenedMessage(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |        << message.fileContainers << ", " | 
					
						
							|  |  |  |        << message.currentEditorFilePath << ", " | 
					
						
							|  |  |  |        << message.visibleEditorFilePaths << ")"; | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &os, const EndMessage &/*message*/) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return os << "()"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &os, const CancelMessage &/*message*/) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return os << "()"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &os, const AliveMessage &/*message*/) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return os << "()"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-05-31 15:21:53 +02:00
										 |  |  | std::ostream &operator<<(std::ostream &os, const CompletionsMessage &message) | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | { | 
					
						
							|  |  |  |     os << "(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |        << message.codeCompletions << ", " | 
					
						
							|  |  |  |        << message.ticketNumber | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |        << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-05-31 15:21:53 +02:00
										 |  |  | std::ostream &operator<<(std::ostream &os, const AnnotationsMessage &message) | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2018-05-31 15:21:53 +02:00
										 |  |  |     os << "AnnotationsMessage(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |        << message.fileContainer | 
					
						
							|  |  |  |        << "," << message.diagnostics.size() | 
					
						
							|  |  |  |        << "," << !message.firstHeaderErrorDiagnostic.text.isEmpty() | 
					
						
							|  |  |  |        << "," << message.tokenInfos.size() | 
					
						
							|  |  |  |        << "," << message.skippedPreprocessorRanges.size() | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |        << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &os, const ReferencesMessage &message) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |       os << "(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |          << message.fileContainer << ", " | 
					
						
							|  |  |  |          << message.ticketNumber << ", " | 
					
						
							|  |  |  |          << message.isLocalVariable << ", " | 
					
						
							|  |  |  |          << message.references << ", " | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |          << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-01-12 12:29:43 +01:00
										 |  |  | std::ostream &operator<<(std::ostream &os, const ToolTipMessage &message) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |       os << "(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |          << message.fileContainer << ", " | 
					
						
							|  |  |  |          << message.ticketNumber << ", " | 
					
						
							|  |  |  |          << message.toolTipInfo << ", " | 
					
						
							| 
									
										
										
										
											2018-01-12 12:29:43 +01:00
										 |  |  |          << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | std::ostream &operator<<(std::ostream &os, const EchoMessage &/*message*/) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |      return os << "()"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-05-31 15:21:53 +02:00
										 |  |  | std::ostream &operator<<(std::ostream &os, const DocumentsClosedMessage &message) | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | { | 
					
						
							|  |  |  |     os << "(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |        << message.fileContainers | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |        << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &os, const CodeCompletion &message) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     os << "(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |        << message.text << ", " | 
					
						
							|  |  |  |        << message.priority << ", " | 
					
						
							|  |  |  |        << message.completionKind << ", " | 
					
						
							|  |  |  |        << message.availability << ", " | 
					
						
							|  |  |  |        << message.hasParameters | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |        << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &os, const CodeCompletionChunk &chunk) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     os << "(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |        << chunk.kind << ", " | 
					
						
							|  |  |  |        << chunk.text; | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |     if (chunk.isOptional) | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |         os << ", optional"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     os << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 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(); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &os, const DiagnosticContainer &container) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     os << "(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |        << severityToText(container.severity) << ": " | 
					
						
							|  |  |  |        << container.text << ", " | 
					
						
							|  |  |  |        << container.category << ", " | 
					
						
							|  |  |  |        << container.enableOption << ", " | 
					
						
							|  |  |  |        << container.location << ", " | 
					
						
							|  |  |  |        << container.ranges << ", " | 
					
						
							|  |  |  |        << container.fixIts << ", " | 
					
						
							|  |  |  |        << container.children << ")"; | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &os, const DynamicASTMatcherDiagnosticContainer &container) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     os << "(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |        <<  container.messages << ", " | 
					
						
							|  |  |  |         << container.contexts | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |         << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &os, const DynamicASTMatcherDiagnosticContextContainer &container) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     os << "(" | 
					
						
							|  |  |  |        << container.contextTypeText() << ", " | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |        << container.sourceRange << ", " | 
					
						
							|  |  |  |        << container.arguments | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |        << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &os, const DynamicASTMatcherDiagnosticMessageContainer &container) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     os << "(" | 
					
						
							|  |  |  |        << container.errorTypeText() << ", " | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |        << container.sourceRange << ", " | 
					
						
							|  |  |  |        << container.arguments | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |        << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &os, const FileContainer &container) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     os << "(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |         << container.filePath << ", " | 
					
						
							| 
									
										
										
										
											2018-09-25 09:41:32 +02:00
										 |  |  |         << container.compilationArguments << ", " | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |         << container.documentRevision << ", " | 
					
						
							|  |  |  |         << container.textCodecName; | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |     if (container.hasUnsavedFileContent) | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |         os << ", " | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |            << container.unsavedFileContent; | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     os << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &os, const FixItContainer &container) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     os << "(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |        << container.text << ", " | 
					
						
							|  |  |  |        << container.range | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |        << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #define RETURN_TEXT_FOR_CASE(enumValue) case HighlightingType::enumValue: return #enumValue
 | 
					
						
							|  |  |  | static const char *highlightingTypeToCStringLiteral(HighlightingType type) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     switch (type) { | 
					
						
							|  |  |  |         RETURN_TEXT_FOR_CASE(Invalid); | 
					
						
							|  |  |  |         RETURN_TEXT_FOR_CASE(Comment); | 
					
						
							|  |  |  |         RETURN_TEXT_FOR_CASE(Keyword); | 
					
						
							|  |  |  |         RETURN_TEXT_FOR_CASE(StringLiteral); | 
					
						
							|  |  |  |         RETURN_TEXT_FOR_CASE(NumberLiteral); | 
					
						
							|  |  |  |         RETURN_TEXT_FOR_CASE(Function); | 
					
						
							|  |  |  |         RETURN_TEXT_FOR_CASE(VirtualFunction); | 
					
						
							|  |  |  |         RETURN_TEXT_FOR_CASE(Type); | 
					
						
							|  |  |  |         RETURN_TEXT_FOR_CASE(LocalVariable); | 
					
						
							| 
									
										
										
										
											2021-03-18 11:13:17 +01:00
										 |  |  |         RETURN_TEXT_FOR_CASE(Parameter); | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |         RETURN_TEXT_FOR_CASE(GlobalVariable); | 
					
						
							|  |  |  |         RETURN_TEXT_FOR_CASE(Field); | 
					
						
							|  |  |  |         RETURN_TEXT_FOR_CASE(Enumeration); | 
					
						
							|  |  |  |         RETURN_TEXT_FOR_CASE(Operator); | 
					
						
							|  |  |  |         RETURN_TEXT_FOR_CASE(Preprocessor); | 
					
						
							|  |  |  |         RETURN_TEXT_FOR_CASE(Label); | 
					
						
							|  |  |  |         RETURN_TEXT_FOR_CASE(FunctionDefinition); | 
					
						
							|  |  |  |         RETURN_TEXT_FOR_CASE(OutputArgument); | 
					
						
							| 
									
										
										
										
											2018-05-08 11:21:42 +02:00
										 |  |  |         RETURN_TEXT_FOR_CASE(OverloadedOperator); | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |         RETURN_TEXT_FOR_CASE(PreprocessorDefinition); | 
					
						
							|  |  |  |         RETURN_TEXT_FOR_CASE(PreprocessorExpansion); | 
					
						
							|  |  |  |         RETURN_TEXT_FOR_CASE(PrimitiveType); | 
					
						
							| 
									
										
										
										
											2018-08-22 17:25:12 +02:00
										 |  |  |         RETURN_TEXT_FOR_CASE(Punctuation); | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |         RETURN_TEXT_FOR_CASE(Declaration); | 
					
						
							| 
									
										
										
										
											2018-01-12 09:44:05 +01:00
										 |  |  |         RETURN_TEXT_FOR_CASE(Namespace); | 
					
						
							|  |  |  |         RETURN_TEXT_FOR_CASE(Class); | 
					
						
							|  |  |  |         RETURN_TEXT_FOR_CASE(Struct); | 
					
						
							|  |  |  |         RETURN_TEXT_FOR_CASE(Enum); | 
					
						
							|  |  |  |         RETURN_TEXT_FOR_CASE(Union); | 
					
						
							|  |  |  |         RETURN_TEXT_FOR_CASE(TypeAlias); | 
					
						
							|  |  |  |         RETURN_TEXT_FOR_CASE(Typedef); | 
					
						
							| 
									
										
										
										
											2018-01-26 15:12:38 +01:00
										 |  |  |         RETURN_TEXT_FOR_CASE(QtProperty); | 
					
						
							| 
									
										
										
										
											2018-02-14 12:24:21 +01:00
										 |  |  |         RETURN_TEXT_FOR_CASE(ObjectiveCClass); | 
					
						
							|  |  |  |         RETURN_TEXT_FOR_CASE(ObjectiveCCategory); | 
					
						
							|  |  |  |         RETURN_TEXT_FOR_CASE(ObjectiveCProtocol); | 
					
						
							|  |  |  |         RETURN_TEXT_FOR_CASE(ObjectiveCInterface); | 
					
						
							|  |  |  |         RETURN_TEXT_FOR_CASE(ObjectiveCImplementation); | 
					
						
							|  |  |  |         RETURN_TEXT_FOR_CASE(ObjectiveCProperty); | 
					
						
							|  |  |  |         RETURN_TEXT_FOR_CASE(ObjectiveCMethod); | 
					
						
							| 
									
										
										
										
											2018-07-19 00:01:20 +03:00
										 |  |  |         RETURN_TEXT_FOR_CASE(TemplateTypeParameter); | 
					
						
							|  |  |  |         RETURN_TEXT_FOR_CASE(TemplateTemplateParameter); | 
					
						
							| 
									
										
										
										
											2021-01-25 17:46:00 +01:00
										 |  |  |         RETURN_TEXT_FOR_CASE(AngleBracketOpen); | 
					
						
							|  |  |  |         RETURN_TEXT_FOR_CASE(AngleBracketClose); | 
					
						
							| 
									
										
										
										
											2021-04-15 13:54:02 +02:00
										 |  |  |         RETURN_TEXT_FOR_CASE(DoubleAngleBracketClose); | 
					
						
							| 
									
										
										
										
											2021-02-10 17:49:04 +01:00
										 |  |  |         RETURN_TEXT_FOR_CASE(TernaryIf); | 
					
						
							|  |  |  |         RETURN_TEXT_FOR_CASE(TernaryElse); | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return ""; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | #undef RETURN_TEXT_FOR_CASE
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 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; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-01-19 09:18:57 +01:00
										 |  |  | std::ostream &operator<<(std::ostream &os, const ExtraInfo &extraInfo) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     os << "(" | 
					
						
							|  |  |  |        << extraInfo.token << ", " | 
					
						
							|  |  |  |        << extraInfo.typeSpelling << ", " | 
					
						
							|  |  |  |        << extraInfo.semanticParentTypeSpelling << ", " | 
					
						
							|  |  |  |        << static_cast<uint>(extraInfo.accessSpecifier) << ", " | 
					
						
							|  |  |  |        << static_cast<uint>(extraInfo.storageClass) << ", " | 
					
						
							|  |  |  |        << extraInfo.identifier << ", " | 
					
						
							|  |  |  |        << extraInfo.includeDirectivePath << ", " | 
					
						
							|  |  |  |        << extraInfo.declaration << ", " | 
					
						
							|  |  |  |        << extraInfo.definition << ", " | 
					
						
							|  |  |  |        << extraInfo.signal << ", " | 
					
						
							| 
									
										
										
										
											2018-01-26 15:12:38 +01:00
										 |  |  |        << extraInfo.slot | 
					
						
							| 
									
										
										
										
											2018-01-19 09:18:57 +01:00
										 |  |  |        << ")"; | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | std::ostream &operator<<(std::ostream &os, const TokenInfoContainer &container) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     os << "(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |        << container.line << ", " | 
					
						
							|  |  |  |        << container.column << ", " | 
					
						
							|  |  |  |        << container.length << ", " | 
					
						
							|  |  |  |        << container.types << ", " | 
					
						
							|  |  |  |        << container.extraInfo << ", " | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |        << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const NativeFilePath &filePath) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << "(" << filePath.path() << ", " << filePath.slashIndex() << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const PrecompiledHeadersUpdatedMessage &message) | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2019-05-22 12:26:58 +02:00
										 |  |  |     out << "(" << message.projectPartIds << ")"; | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     return out; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const ProjectPartPch &projectPartPch) | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2019-05-22 12:26:58 +02:00
										 |  |  |     out << "(" << projectPartPch.projectPartId << ", " << projectPartPch.pchPath << ", " | 
					
						
							| 
									
										
										
										
											2018-09-11 17:02:45 +02:00
										 |  |  |         << projectPartPch.lastModified << ")"; | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     return out; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-05-31 15:21:53 +02:00
										 |  |  | std::ostream &operator<<(std::ostream &os, const UnsavedFilesUpdatedMessage &message) | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | { | 
					
						
							|  |  |  |     os << "(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |        << message.fileContainers | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |        << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-05-31 15:21:53 +02:00
										 |  |  | std::ostream &operator<<(std::ostream &os, const RequestAnnotationsMessage &message) | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | { | 
					
						
							|  |  |  |     os << "(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |        << message.fileContainer.filePath << "," | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |        << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-20 12:43:05 +01:00
										 |  |  | std::ostream &operator<<(std::ostream &out, const RemoveProjectPartsMessage &message) | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |     return out << "(" << message.projectsPartIds << ")"; | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &os, const RequestFollowSymbolMessage &message) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     os << "(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |        << message.fileContainer << ", " | 
					
						
							|  |  |  |        << message.ticketNumber << ", " | 
					
						
							|  |  |  |        << message.line << ", " | 
					
						
							|  |  |  |        << message.column << ", " | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |        << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |      return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &os, const RequestReferencesMessage &message) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     os << "(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |        << message.fileContainer << ", " | 
					
						
							|  |  |  |        << message.ticketNumber << ", " | 
					
						
							|  |  |  |        << message.line << ", " | 
					
						
							|  |  |  |        << message.column << ", " | 
					
						
							|  |  |  |        << message.local << ", " | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |        << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |      return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-01-12 12:29:43 +01:00
										 |  |  | std::ostream &operator<<(std::ostream &out, const RequestToolTipMessage &message) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     out << "(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |         << message.fileContainer << ", " | 
					
						
							|  |  |  |         << message.ticketNumber << ", " | 
					
						
							|  |  |  |         << message.line << ", " | 
					
						
							|  |  |  |         << message.column << ", " | 
					
						
							| 
									
										
										
										
											2018-01-12 12:29:43 +01:00
										 |  |  |         << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |      return out; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &os, const ToolTipInfo::QdocCategory category) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return os << qdocCategoryToString(category); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const ToolTipInfo &info) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     out << "(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |        << info.text << ", " | 
					
						
							|  |  |  |        << info.briefComment << ", " | 
					
						
							|  |  |  |        << info.qdocIdCandidates << ", " | 
					
						
							|  |  |  |        << info.qdocMark << ", " | 
					
						
							|  |  |  |        << info.qdocCategory | 
					
						
							|  |  |  |        << info.sizeInBytes << ", " | 
					
						
							| 
									
										
										
										
											2018-01-12 12:29:43 +01:00
										 |  |  |        << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return out; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | std::ostream &operator<<(std::ostream &os, const RequestSourceRangesAndDiagnosticsForQueryMessage &message) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     os << "(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |        << message.query << ", " | 
					
						
							|  |  |  |        << message.source | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |        << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &os, const RequestSourceRangesForQueryMessage &message) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     os << "(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |        << message.query | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |        << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &os, const SourceLocationContainer &container) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     os << "(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |        << container.filePath << ", " | 
					
						
							|  |  |  |        << container.line << ", " | 
					
						
							|  |  |  |        << container.column | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |        << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &os, const SourceRangeContainer &container) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     os << "(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |        << container.start << ", " | 
					
						
							|  |  |  |        << container.end | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |        << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &os, const SourceRangesAndDiagnosticsForQueryMessage &message) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     os << "(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |         << message.sourceRanges << ", " | 
					
						
							|  |  |  |         << message.diagnostics | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |         << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &os, const SourceRangesContainer &container) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     os << "(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |        << container.sourceRangeWithTextContainers | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |        << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &os, const SourceRangesForQueryMessage &message) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     os << "(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |         << message.sourceRanges | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |         << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &os, const SourceRangeWithTextContainer &container) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     os << "(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |         << container.start << ", " | 
					
						
							|  |  |  |         << container.end << ", " | 
					
						
							|  |  |  |         << container.text | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |         << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-05-31 15:21:53 +02:00
										 |  |  | std::ostream &operator<<(std::ostream &os, const UnsavedFilesRemovedMessage &message) | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | { | 
					
						
							|  |  |  |     os << "(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |         << message.fileContainers | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |         << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-20 12:43:05 +01:00
										 |  |  | std::ostream &operator<<(std::ostream &out, const UpdateProjectPartsMessage &message) | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | { | 
					
						
							|  |  |  |     return out << "(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |                << message.projectsParts | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |                << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-05-31 15:21:53 +02:00
										 |  |  | std::ostream &operator<<(std::ostream &os, const DocumentsChangedMessage &message) | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2018-05-31 15:21:53 +02:00
										 |  |  |     os << "DocumentsChangedMessage(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |        << message.fileContainers | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |        << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-05-31 15:21:53 +02:00
										 |  |  | std::ostream &operator<<(std::ostream &os, const DocumentVisibilityChangedMessage &message) | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | { | 
					
						
							|  |  |  |     os << "(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |        << message.currentEditorFilePath  << ", " | 
					
						
							|  |  |  |        << message.visibleEditorFilePaths | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |        << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const FilePath &filePath) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << "(" << filePath.path() << ", " << filePath.slashIndex() << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-01-22 14:21:01 +01:00
										 |  |  | std::ostream &operator<<(std::ostream &out, const ProjectPartEntry &projectPartEntry) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << "(" | 
					
						
							|  |  |  |                << projectPartEntry.projectPathName | 
					
						
							|  |  |  |                << ", " | 
					
						
							|  |  |  |                << projectPartEntry.filePathIds | 
					
						
							|  |  |  |                << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-01-25 15:20:47 +01:00
										 |  |  | std::ostream &operator<<(std::ostream &out, const UsedMacro &usedMacro) | 
					
						
							| 
									
										
										
										
											2018-01-22 14:21:01 +01:00
										 |  |  | { | 
					
						
							|  |  |  |     return out << "(" | 
					
						
							| 
									
										
										
										
											2018-01-25 15:20:47 +01:00
										 |  |  |                << usedMacro.filePathId | 
					
						
							| 
									
										
										
										
											2018-01-22 14:21:01 +01:00
										 |  |  |                << ", " | 
					
						
							| 
									
										
										
										
											2018-01-25 15:20:47 +01:00
										 |  |  |                << usedMacro.macroName | 
					
						
							| 
									
										
										
										
											2018-01-22 14:21:01 +01:00
										 |  |  |                << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-01 18:29:45 +01:00
										 |  |  | std::ostream &operator<<(std::ostream &out, const FileStatus &fileStatus) | 
					
						
							| 
									
										
										
										
											2018-01-29 15:47:53 +01:00
										 |  |  | { | 
					
						
							|  |  |  |     return out << "(" | 
					
						
							| 
									
										
										
										
											2018-02-01 18:29:45 +01:00
										 |  |  |                << fileStatus.filePathId | 
					
						
							| 
									
										
										
										
											2018-01-29 15:47:53 +01:00
										 |  |  |                << ", " | 
					
						
							| 
									
										
										
										
											2018-02-01 18:29:45 +01:00
										 |  |  |                << fileStatus.size | 
					
						
							| 
									
										
										
										
											2018-01-29 15:47:53 +01:00
										 |  |  |                << ", " | 
					
						
							| 
									
										
										
										
											2018-02-01 18:29:45 +01:00
										 |  |  |                << fileStatus.lastModified | 
					
						
							| 
									
										
										
										
											2018-01-29 15:47:53 +01:00
										 |  |  |                << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-01-31 13:53:57 +01:00
										 |  |  | std::ostream &operator<<(std::ostream &out, const SourceDependency &sourceDependency) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << "(" | 
					
						
							|  |  |  |                << sourceDependency.filePathId | 
					
						
							|  |  |  |                << ", " | 
					
						
							|  |  |  |                << sourceDependency.dependencyFilePathId | 
					
						
							|  |  |  |                << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-06 11:16:29 +01:00
										 |  |  | std::ostream &operator<<(std::ostream &out, const ProjectPartArtefact &projectPartArtefact) | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2019-03-13 15:09:30 +01:00
										 |  |  |     return out << "(" << projectPartArtefact.projectPartId << ", " | 
					
						
							|  |  |  |                << projectPartArtefact.toolChainArguments << ", " << projectPartArtefact.compilerMacros | 
					
						
							|  |  |  |                << ", " << projectPartArtefact.language << ", " << projectPartArtefact.languageVersion | 
					
						
							|  |  |  |                << ", " << projectPartArtefact.languageExtension << ")"; | 
					
						
							| 
									
										
										
										
											2018-02-06 11:16:29 +01:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-06 19:03:14 +01:00
										 |  |  | std::ostream &operator<<(std::ostream &out, const CompilerMacro &compilerMacro) | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2018-11-27 11:49:58 +01:00
										 |  |  |     return out << "(" << compilerMacro.key << ", " << compilerMacro.value << ", " | 
					
						
							|  |  |  |                << compilerMacro.index << ")"; | 
					
						
							| 
									
										
										
										
											2018-02-06 19:03:14 +01:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-03-22 17:46:43 +01:00
										 |  |  | std::ostream &operator<<(std::ostream &out, const SymbolEntry &entry) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     out << "(" | 
					
						
							|  |  |  |         << entry.symbolName << ", " | 
					
						
							|  |  |  |         << entry.usr << ", " | 
					
						
							|  |  |  |         << entry.symbolKind <<")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return out; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | const char *symbolKindString(SymbolKind symbolKind) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     using ClangBackEnd::SymbolKind; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     switch (symbolKind) { | 
					
						
							| 
									
										
										
										
											2018-04-04 16:58:47 +02:00
										 |  |  |     case SymbolKind::None: return "None"; | 
					
						
							|  |  |  |     case SymbolKind::Enumeration: return "Enumeration"; | 
					
						
							|  |  |  |     case SymbolKind::Record: return "Record"; | 
					
						
							|  |  |  |     case SymbolKind::Function: return "Function"; | 
					
						
							|  |  |  |     case SymbolKind::Variable: return "Variable"; | 
					
						
							|  |  |  |     case SymbolKind::Macro: return "Macro"; | 
					
						
							| 
									
										
										
										
											2018-03-22 17:46:43 +01:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return ""; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, SymbolKind symbolKind) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << symbolKindString(symbolKind); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | const char *symbolTagString(SymbolTag symbolTag) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     using ClangBackEnd::SymbolTag; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     switch (symbolTag) { | 
					
						
							| 
									
										
										
										
											2018-04-04 16:58:47 +02:00
										 |  |  |     case SymbolTag::None: return "None"; | 
					
						
							| 
									
										
										
										
											2018-03-22 17:46:43 +01:00
										 |  |  |     case SymbolTag::Class: return "Class"; | 
					
						
							|  |  |  |     case SymbolTag::Struct: return "Struct"; | 
					
						
							| 
									
										
										
										
											2018-04-04 16:58:47 +02:00
										 |  |  |     case SymbolTag::Union: return "Union"; | 
					
						
							| 
									
										
										
										
											2018-03-22 17:46:43 +01:00
										 |  |  |     case SymbolTag::MsvcInterface: return "MsvcInterface"; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return ""; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, SymbolTag symbolTag) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << symbolTagString(symbolTag); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, SymbolTags symbolTags) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     std::copy(symbolTags.cbegin(), symbolTags.cend(), std::ostream_iterator<SymbolTag>(out, ", ")); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return out; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-08-07 19:01:01 +02:00
										 |  |  | std::ostream &operator<<(std::ostream &out, const UpdateGeneratedFilesMessage &message) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << "(" << message.generatedFiles << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const RemoveGeneratedFilesMessage &message) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << "(" << message.generatedFiles << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-08-22 17:20:08 +02:00
										 |  |  | std::ostream &operator<<(std::ostream &out, const SymbolIndexerTask &task) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << "(" << task.filePathId << ", " << task.projectPartId << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-09-27 17:52:44 +02:00
										 |  |  | const char* progressTypeToString(ClangBackEnd::ProgressType type) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     switch (type) { | 
					
						
							| 
									
										
										
										
											2019-03-13 15:09:30 +01:00
										 |  |  |     case ProgressType::Invalid: | 
					
						
							|  |  |  |         return "Invalid"; | 
					
						
							|  |  |  |     case ProgressType::PrecompiledHeader: | 
					
						
							|  |  |  |         return "PrecompiledHeader"; | 
					
						
							|  |  |  |     case ProgressType::Indexing: | 
					
						
							|  |  |  |         return "Indexing"; | 
					
						
							|  |  |  |     case ProgressType::DependencyCreation: | 
					
						
							|  |  |  |         return "Indexing"; | 
					
						
							| 
									
										
										
										
											2018-09-27 17:52:44 +02:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return nullptr; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const ProgressMessage &message) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << "(" << progressTypeToString(message.progressType) << ", " | 
					
						
							|  |  |  |                << message.progress << ", " | 
					
						
							|  |  |  |                << message.total << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-10-24 16:46:41 +02:00
										 |  |  | std::ostream &operator<<(std::ostream &out, const PchTask &task) | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2018-12-04 19:03:48 +01:00
										 |  |  |     return out << "(" << task.projectPartIds << ", " << task.includes << ", " << task.compilerMacros | 
					
						
							| 
									
										
										
										
											2019-01-30 18:48:59 +01:00
										 |  |  |                << toText(task.language) << ", " << task.systemIncludeSearchPaths << ", " | 
					
						
							|  |  |  |                << task.projectIncludeSearchPaths << ", " << task.toolChainArguments << ", " | 
					
						
							|  |  |  |                << toText(task.languageVersion) << ", " << toText(task.languageExtension) << ")"; | 
					
						
							| 
									
										
										
										
											2018-12-17 12:06:57 +01:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const PchTaskSet &taskSet) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << "(" << taskSet.system << ", " << taskSet.project << ")"; | 
					
						
							| 
									
										
										
										
											2018-10-24 16:46:41 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const BuildDependency &dependency) | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2018-11-12 19:27:51 +01:00
										 |  |  |     return out << "(\n" | 
					
						
							| 
									
										
										
										
											2019-02-25 19:07:19 +01:00
										 |  |  |                << "includes: " << dependency.sources << ",\n" | 
					
						
							|  |  |  |                << "usedMacros: " << dependency.usedMacros << ",\n" | 
					
						
							|  |  |  |                << "fileStatuses: " << dependency.fileStatuses << ",\n" | 
					
						
							|  |  |  |                << "sourceFiles: " << dependency.sourceFiles << ",\n" | 
					
						
							|  |  |  |                << "sourceDependencies: " << dependency.sourceDependencies << ",\n" | 
					
						
							| 
									
										
										
										
											2018-11-12 19:27:51 +01:00
										 |  |  |                << ")"; | 
					
						
							| 
									
										
										
										
											2018-10-24 16:46:41 +02:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2018-10-18 11:27:49 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-12-04 19:03:48 +01:00
										 |  |  | std::ostream &operator<<(std::ostream &out, const SlotUsage &slotUsage) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << "(" << slotUsage.free << ", " << slotUsage.used << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-28 17:52:34 +01:00
										 |  |  | const char *typeToString(SourceType sourceType) | 
					
						
							| 
									
										
										
										
											2018-10-25 11:08:39 +02:00
										 |  |  | { | 
					
						
							|  |  |  |     using ClangBackEnd::SymbolTag; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     switch (sourceType) { | 
					
						
							| 
									
										
										
										
											2019-03-13 15:09:30 +01:00
										 |  |  |     case SourceType::TopProjectInclude: | 
					
						
							|  |  |  |         return "TopProjectInclude"; | 
					
						
							|  |  |  |     case SourceType::TopSystemInclude: | 
					
						
							|  |  |  |         return "TopSystemInclude"; | 
					
						
							|  |  |  |     case SourceType::SystemInclude: | 
					
						
							|  |  |  |         return "SystemInclude"; | 
					
						
							|  |  |  |     case SourceType::ProjectInclude: | 
					
						
							|  |  |  |         return "ProjectInclude"; | 
					
						
							|  |  |  |     case SourceType::UserInclude: | 
					
						
							|  |  |  |         return "UserInclude"; | 
					
						
							|  |  |  |     case SourceType::Source: | 
					
						
							|  |  |  |         return "Source"; | 
					
						
							| 
									
										
										
										
											2018-10-25 11:08:39 +02:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return ""; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-28 17:52:34 +01:00
										 |  |  | const char *typeToString(HasMissingIncludes hasMissingIncludes) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     using ClangBackEnd::SymbolTag; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     switch (hasMissingIncludes) { | 
					
						
							|  |  |  |     case HasMissingIncludes::No: | 
					
						
							|  |  |  |         return "HasMissingIncludes::No"; | 
					
						
							|  |  |  |     case HasMissingIncludes::Yes: | 
					
						
							|  |  |  |         return "HasMissingIncludes::Yes"; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return ""; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-10-25 11:08:39 +02:00
										 |  |  | std::ostream &operator<<(std::ostream &out, const SourceEntry &entry) | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2019-02-28 17:52:34 +01:00
										 |  |  |     return out << "(" << entry.sourceId << ", " << typeToString(entry.sourceType) << ", " | 
					
						
							|  |  |  |                << typeToString(entry.hasMissingIncludes) << ")"; | 
					
						
							| 
									
										
										
										
											2018-10-25 11:08:39 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-03-21 17:55:24 +01:00
										 |  |  | std::ostream &operator<<(std::ostream &out, const SourceTimeStamp &sourceTimeStamp) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << "(" << sourceTimeStamp.sourceId << ", " << sourceTimeStamp.timeStamp << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const TimeStamp &timeStamp) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << timeStamp.value; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-12-17 12:06:57 +01:00
										 |  |  | const char *typeToString(IncludeSearchPathType type) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     switch (type) { | 
					
						
							|  |  |  |     case IncludeSearchPathType::Invalid: | 
					
						
							|  |  |  |         return "Invalid"; | 
					
						
							|  |  |  |     case IncludeSearchPathType::User: | 
					
						
							|  |  |  |         return "User"; | 
					
						
							|  |  |  |     case IncludeSearchPathType::System: | 
					
						
							|  |  |  |         return "System"; | 
					
						
							|  |  |  |     case IncludeSearchPathType::BuiltIn: | 
					
						
							|  |  |  |         return "BuiltIn"; | 
					
						
							|  |  |  |     case IncludeSearchPathType::Framework: | 
					
						
							|  |  |  |         return "Framework"; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return nullptr; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const IncludeSearchPathType &pathType) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << "IncludeSearchPathType::" << typeToString(pathType); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const IncludeSearchPath &path) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << "(" << path.path << ", " << path.index << ", " << typeToString(path.type) << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const ArgumentsEntry &entry) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << "(" << entry.ids << ", " << entry.arguments << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const ProjectPartContainer &container) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     out << "(" << container.projectPartId << ", " << container.toolChainArguments << ", " | 
					
						
							|  |  |  |         << container.headerPathIds << ", " << container.sourcePathIds << ", " | 
					
						
							|  |  |  |         << container.compilerMacros << ", " << container.systemIncludeSearchPaths << ", " | 
					
						
							|  |  |  |         << container.projectIncludeSearchPaths << ", " << toText(container.language) << ", " | 
					
						
							|  |  |  |         << toText(container.languageVersion) << ", " << toText(container.languageExtension) << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return out; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-03-13 15:09:30 +01:00
										 |  |  | std::ostream &operator<<(std::ostream &out, const ProjectPartId &projectPathId) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << projectPathId.projectPathId; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-10 19:24:36 +02:00
										 |  |  | std::ostream &operator<<(std::ostream &out, const PchPaths &pchPaths) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << "(" << pchPaths.projectPchPath << ", " << pchPaths.systemPchPath << ")"; | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2019-06-20 18:34:02 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const ProjectChunkId &chunk) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << "(" << chunk.id << ", " << typeToString(chunk.sourceType) << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const DirectoryPathId &id) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << id.directoryPathId; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-28 22:07:28 +01:00
										 |  |  | void PrintTo(const FilePath &filePath, ::std::ostream *os) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     *os << filePath; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | void PrintTo(const FilePathView &filePathView, ::std::ostream *os) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     *os << filePathView; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-01-22 14:21:01 +01:00
										 |  |  | void PrintTo(const FilePathId &filePathId, ::std::ostream *os) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     *os << filePathId; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | namespace V2 { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &os, const FileContainer &container) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     os << "(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |         << container.filePath << ", " | 
					
						
							|  |  |  |         << container.commandLineArguments << ", " | 
					
						
							|  |  |  |         << container.documentRevision; | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |     if (container.unsavedFileContent.hasContent()) | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |         os << ", \"" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |             << container.unsavedFileContent; | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     os << "\")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &os, const SourceLocationContainer &container) | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2018-11-06 19:02:00 +01:00
										 |  |  |     os << "(" | 
					
						
							|  |  |  |        << container.filePathId.filePathId << ", " | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |        << container.line << ", " | 
					
						
							|  |  |  |        << container.column << ", " | 
					
						
							|  |  |  |        << container.offset | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |        << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &os, const SourceRangeContainer &container) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     os << "(" | 
					
						
							| 
									
										
										
										
											2018-04-04 18:25:23 +02:00
										 |  |  |        << container.start << ", " | 
					
						
							|  |  |  |        << container.end | 
					
						
							| 
									
										
										
										
											2017-11-30 16:11:40 +01:00
										 |  |  |        << ")"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return os; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | } // namespace V2
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-09-21 11:43:59 +02:00
										 |  |  | } // namespace ClangBackEnd
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace ClangRefactoring { | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const SourceLocation &location) | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2018-04-09 13:30:30 +02:00
										 |  |  |     return out << "(" << location.filePathId << ", " << location.lineColumn << ")"; | 
					
						
							| 
									
										
										
										
											2017-02-07 15:00:38 +01:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2018-04-09 13:30:30 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const Symbol &symbol) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << "(" << symbol.name << ", " << symbol.symbolId << ", " << symbol.signature << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | } // namespace ClangRefactoring
 | 
					
						
							| 
									
										
										
										
											2017-10-18 13:38:58 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace CppTools { | 
					
						
							|  |  |  | class Usage; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const Usage &usage) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << "(" << usage.path << ", " << usage.line << ", " << usage.column <<")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | } // namespace CppTools
 | 
					
						
							| 
									
										
										
										
											2018-11-12 19:27:51 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-23 08:28:13 +02:00
										 |  |  | namespace Debugger { | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const DiagnosticLocation &loc) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << "(" << loc.filePath << ", " << loc.line << ", " << loc.column << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | } // namespace Debugger
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace ClangTools { | 
					
						
							|  |  |  | namespace Internal { | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const ExplainingStep &step) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << "(" | 
					
						
							|  |  |  |                << step.message << ", " | 
					
						
							|  |  |  |                << step.location << ", " | 
					
						
							|  |  |  |                << step.ranges << ", " | 
					
						
							|  |  |  |                << step.isFixIt | 
					
						
							|  |  |  |                << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const Diagnostic &diag) { | 
					
						
							|  |  |  |     return out << "(" | 
					
						
							| 
									
										
										
										
											2020-05-13 12:25:24 +02:00
										 |  |  |                << diag.name << ", " | 
					
						
							| 
									
										
										
										
											2019-07-23 08:28:13 +02:00
										 |  |  |                << diag.description << ", " | 
					
						
							|  |  |  |                << diag.category << ", " | 
					
						
							|  |  |  |                << diag.type << ", " | 
					
						
							|  |  |  |                << diag.location << ", " | 
					
						
							|  |  |  |                << diag.explainingSteps << ", " | 
					
						
							|  |  |  |                << diag.hasFixits | 
					
						
							|  |  |  |                << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | } // namespace Internal
 | 
					
						
							|  |  |  | } // namespace ClangTools
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-06-18 19:46:01 +02:00
										 |  |  | namespace QmlDesigner { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const ModelNode &node) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     if (!node.isValid()) | 
					
						
							|  |  |  |         return out << "(invalid)"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return out << "(" << node.id() << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | std::ostream &operator<<(std::ostream &out, const VariantProperty &property) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     if (!property.isValid()) | 
					
						
							|  |  |  |         return out << "(invalid)"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return out << "(" << property.parentModelNode() << ", " << property.name() << ", " | 
					
						
							|  |  |  |                << property.value() << ")"; | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2020-09-16 13:44:43 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | namespace Internal { | 
					
						
							| 
									
										
										
										
											2021-01-13 13:23:46 +01:00
										 |  |  | std::ostream &operator<<(std::ostream &out, const ImageCacheStorageImageEntry &entry) | 
					
						
							| 
									
										
										
										
											2020-09-16 13:44:43 +02:00
										 |  |  | { | 
					
						
							|  |  |  |     return out << "(" << entry.image << ", " << entry.hasEntry << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-01-13 13:23:46 +01:00
										 |  |  | std::ostream &operator<<(std::ostream &out, const ImageCacheStorageIconEntry &entry) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     return out << "(" << entry.icon << ", " << entry.hasEntry << ")"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-09-16 13:44:43 +02:00
										 |  |  | } // namespace Internal
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-06-18 19:46:01 +02:00
										 |  |  | } // namespace QmlDesigner
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-12 19:27:51 +01:00
										 |  |  | void setFilePathCache(ClangBackEnd::FilePathCaching *cache) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     filePathCache = cache; | 
					
						
							|  |  |  | } |