diff options
author | Volodymyr Zibarov <gogan419@gmail.com> | 2020-05-14 23:07:05 +0300 |
---|---|---|
committer | Volodymyr Zibarov <gogan419@gmail.com> | 2020-05-29 12:39:28 +0000 |
commit | 9ee693ee229d28bd618e8dd44bc6b12750d43a29 (patch) | |
tree | 7a2a4dd6679fd3647228b5c39d1fc2724ff133a3 /src/libs/3rdparty/cplusplus/ASTMatch0.cpp | |
parent | be97943372bc80d2440daa20cd658599d765b9a9 (diff) |
C++: fix built-in code model to work with shared_ptr on MSVC 2017
These changes target Find Usages feature to work with shared_ptr.
Improve libs/3rdparty/cplusplus and plugins/cplusplus:
parse __declspec() attribute,
call to variadic function template without specified template arguments,
if constexpr,
c++11 attributes [[value]],
function templates with default parameters,
resolve order for function vs template with default parameter,
template operator->() with default arguments,
template specialization with numeric values,
find best partial specialization,
fix partial specialization for non-first specialized argument
Fixes: QTCREATORBUG-7866
Fixes: QTCREATORBUG-20781
Fixes: QTCREATORBUG-22857
Fixes: QTCREATORBUG-17825
Change-Id: I31a080f7729edfb2ee9650f1aff48daeba5a673b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Nikolai Kosjar <pinaceae.pinus@gmail.com>
Diffstat (limited to 'src/libs/3rdparty/cplusplus/ASTMatch0.cpp')
-rw-r--r-- | src/libs/3rdparty/cplusplus/ASTMatch0.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/libs/3rdparty/cplusplus/ASTMatch0.cpp b/src/libs/3rdparty/cplusplus/ASTMatch0.cpp index 66c6a1be4d..1a82d29f6e 100644 --- a/src/libs/3rdparty/cplusplus/ASTMatch0.cpp +++ b/src/libs/3rdparty/cplusplus/ASTMatch0.cpp @@ -72,6 +72,22 @@ bool GnuAttributeSpecifierAST::match0(AST *pattern, ASTMatcher *matcher) return false; } +bool MsvcDeclspecSpecifierAST::match0(AST *pattern, ASTMatcher *matcher) +{ + if (MsvcDeclspecSpecifierAST *_other = pattern->asMsvcDeclspecSpecifier()) + return matcher->match(this, _other); + + return false; +} + +bool StdAttributeSpecifierAST::match0(AST *pattern, ASTMatcher *matcher) +{ + if (StdAttributeSpecifierAST *_other = pattern->asStdAttributeSpecifier()) + return matcher->match(this, _other); + + return false; +} + bool GnuAttributeAST::match0(AST *pattern, ASTMatcher *matcher) { if (GnuAttributeAST *_other = pattern->asGnuAttribute()) |