diff options
author | Nikolai Kosjar <[email protected]> | 2015-11-19 13:49:26 +0100 |
---|---|---|
committer | Nikolai Kosjar <[email protected]> | 2015-11-19 14:48:38 +0000 |
commit | 0498fb68ff76adc39c8744ff354d5dcc5ab94da8 (patch) | |
tree | bc0c26904e3cc144d879e4d522c1ce2bf1bbca7b /src/libs/cplusplus/DeprecatedGenTemplateInstance.h | |
parent | c2a2883c4a982e52947e73ca97ba646fda54e6e2 (diff) |
C++: Revert lookup to 3.4.2
...which was least buggy.
The bugs fixed by the changes we revert here (highlighting/completion
for code involving templates) were minor compared to ones we currently
have. Those bugs will be addressed by the clang code model anyway.
Relevant commits were collected via:
$ cd ${QTC}/src/libs/cplusplus
$ git log \
--no-merges \
--format=oneline \
v3.4.2..HEAD \
-- LookupContext.* ResolveExpression.* TypeResolver.* TypeOfExpression.* \
../../plugins/cpptools/cppcompletion_test.cpp
From this list the following were skipped due to irrelevance:
88c5b47e535d91f3db99882d5b50b263b46f223c # CppTools: Minor cleanup in completion tests
e5255a1f5cac284c4f0d4a85203878c84da86e85 # CppTools: Add a test for ObjC not replacing dot with arrow
5b12c8d63a30e281274cdc267efabead2c736bd8 # CppTools: Support ObjC in member access operator tests
9fef4fb9ca4e65e20ff13b98bcf15e3c6232fdfb # CPlusPlus: Fix warnings about overriding visit(...) methods
There were only minor conflicts while reverting those.
This changes touches so many files because there were quite some
cleanups and renames after the 3.4.2 release.
Task-number: QTCREATORBUG-14889
Task-number: QTCREATORBUG-15211
Task-number: QTCREATORBUG-15213
Task-number: QTCREATORBUG-15257
Task-number: QTCREATORBUG-15264
Task-number: QTCREATORBUG-15291
Task-number: QTCREATORBUG-15329
Change-Id: I01f759f8f35ecb4228928a4f22086e279c1a5435
Reviewed-by: Marco Bubke <[email protected]>
Diffstat (limited to 'src/libs/cplusplus/DeprecatedGenTemplateInstance.h')
-rw-r--r-- | src/libs/cplusplus/DeprecatedGenTemplateInstance.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/src/libs/cplusplus/DeprecatedGenTemplateInstance.h b/src/libs/cplusplus/DeprecatedGenTemplateInstance.h new file mode 100644 index 00000000000..9e488478c6e --- /dev/null +++ b/src/libs/cplusplus/DeprecatedGenTemplateInstance.h @@ -0,0 +1,63 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://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 http://www.qt.io/terms-conditions. For further information +** use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +#ifndef CPLUSPLUS_DEPRECATEDGENTEMPLATEINSTANCE_H +#define CPLUSPLUS_DEPRECATEDGENTEMPLATEINSTANCE_H + +#include <cplusplus/TypeVisitor.h> +#include <cplusplus/NameVisitor.h> +#include <cplusplus/FullySpecifiedType.h> + +#include <QList> +#include <QPair> +#include <QSharedPointer> + +namespace CPlusPlus { + +class CPLUSPLUS_EXPORT DeprecatedGenTemplateInstance +{ +public: + typedef QList< QPair<const Identifier *, FullySpecifiedType> > Substitution; + +public: + static FullySpecifiedType instantiate(const Name *className, Symbol *candidate, QSharedPointer<Control> control); + +private: + DeprecatedGenTemplateInstance(QSharedPointer<Control> control, const Substitution &substitution); + FullySpecifiedType gen(Symbol *symbol); + +private: + QSharedPointer<Control> _control; + const Substitution _substitution; +}; + +} // namespace CPlusPlus + +#endif // CPLUSPLUS_DEPRECATEDGENTEMPLATEINSTANCE_H |