diff options
author | Volodymyr Zibarov <gogan419@gmail.com> | 2020-06-02 13:11:18 +0300 |
---|---|---|
committer | Volodymyr Zibarov <gogan419@gmail.com> | 2020-06-03 12:11:15 +0000 |
commit | 586ce5b4721405af6ffdce78e54bbec70b6afd94 (patch) | |
tree | 7de1078dcb269faa1bd42fdd162a0c4097df1e86 /src/libs/3rdparty/cplusplus/Control.cpp | |
parent | d1a2de747efd35e1864d34db6b0de7b4b4e9eac0 (diff) |
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/3rdparty/cplusplus/Control.cpp')
-rw-r--r-- | src/libs/3rdparty/cplusplus/Control.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/libs/3rdparty/cplusplus/Control.cpp b/src/libs/3rdparty/cplusplus/Control.cpp index ff966ee332..4033b16028 100644 --- a/src/libs/3rdparty/cplusplus/Control.cpp +++ b/src/libs/3rdparty/cplusplus/Control.cpp @@ -821,11 +821,6 @@ bool Control::hasSymbol(Symbol *symbol) const return std::find(d->symbols.begin(), d->symbols.end(), symbol) != d->symbols.end(); } -void Control::squeeze() -{ - d->numericLiterals.reset(); -} - TopLevelDeclarationProcessor *Control::topLevelDeclarationProcessor() const { return d->processor; |