summaryrefslogtreecommitdiff
path: root/src/libs/cplusplus/CppDocument.cpp
diff options
context:
space:
mode:
authorVolodymyr Zibarov <gogan419@gmail.com>2020-06-02 13:11:18 +0300
committerVolodymyr Zibarov <gogan419@gmail.com>2020-06-03 12:11:15 +0000
commit586ce5b4721405af6ffdce78e54bbec70b6afd94 (patch)
tree7de1078dcb269faa1bd42fdd162a0c4097df1e86 /src/libs/cplusplus/CppDocument.cpp
parentd1a2de747efd35e1864d34db6b0de7b4b4e9eac0 (diff)
downloadqt-creator-586ce5b4721405af6ffdce78e54bbec70b6afd94.tar.gz
C++: Print numeric template arguments in NamePrettyPrinter
Improve type printed for template specializations with numeric or bool values. Code example: template<bool B, class T> struct enable_if{}; template<class T> struct enable_if<true, T>{ typedef T type; }; In outline: "enable_if<_Tp1, T> <T>" becomes "enable_if<true, T> <T>" TemplateArgument class holds pointer to numeric literal owned by CppDocument, so remove Control::squeeze() to not release numericLiterals in CppDocument::releaseSourceAndAST() This based on TemplateArgument class introduced in commit 9ee693ee229d28bd618e8dd44bc6b12750d43a29 Change-Id: Ib787a5e402c3e8d8467b520347a26afa6087d4bd Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/libs/cplusplus/CppDocument.cpp')
-rw-r--r--src/libs/cplusplus/CppDocument.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/libs/cplusplus/CppDocument.cpp b/src/libs/cplusplus/CppDocument.cpp
index a0d0ef8362..5b55d09c19 100644
--- a/src/libs/cplusplus/CppDocument.cpp
+++ b/src/libs/cplusplus/CppDocument.cpp
@@ -711,8 +711,6 @@ void Document::releaseSourceAndAST()
if (!_keepSourceAndASTCount.deref()) {
_source.clear();
_translationUnit->release();
- if (_control)
- _control->squeeze();
}
}