From 9ee693ee229d28bd618e8dd44bc6b12750d43a29 Mon Sep 17 00:00:00 2001 From: Volodymyr Zibarov Date: Thu, 14 May 2020 23:07:05 +0300 Subject: 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 Reviewed-by: Nikolai Kosjar --- src/plugins/cpptools/cpppointerdeclarationformatter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/plugins/cpptools/cpppointerdeclarationformatter.cpp') diff --git a/src/plugins/cpptools/cpppointerdeclarationformatter.cpp b/src/plugins/cpptools/cpppointerdeclarationformatter.cpp index 82df823af1..391e5b2a82 100644 --- a/src/plugins/cpptools/cpppointerdeclarationformatter.cpp +++ b/src/plugins/cpptools/cpppointerdeclarationformatter.cpp @@ -98,12 +98,13 @@ static unsigned firstTypeSpecifierWithoutFollowingAttribute( case T_TYPEDEF: case T_CONSTEXPR: case T___ATTRIBUTE__: + case T___DECLSPEC: continue; default: // Check if attributes follow for (unsigned i = index; i <= endToken; ++i) { const int tokenKind = translationUnit->tokenKind(i); - if (tokenKind == T___ATTRIBUTE__) + if (tokenKind == T___ATTRIBUTE__ || tokenKind == T___DECLSPEC) return 0; } *found = true; -- cgit v1.2.1