aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/3rdparty/cplusplus/Symbols.cpp
Commit message (Collapse)AuthorAgeFilesLines
* CPlusPlus: Fix some crashhjk2018-05-161-0/+3
| | | | | Change-Id: I8b98d86e7d5321e2420d388abba159474d7ad799 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Merge remote-tracking branch 'origin/4.4'Eike Ziller2017-09-191-1/+5
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/debugger/debuggerdialogs.cpp src/plugins/debugger/gdb/remotegdbserveradapter.cpp Change-Id: I1ae77869887a8d9ef2a33439f2733315db9e0cf0
| * CPlusPlus: Avoid nullptr accessNikolai Kosjar2017-09-131-1/+5
| | | | | | | | | | | | | | Task-number: QTCREATORBUG-18903 Change-Id: I852b5de453d44c16adffd44c89900cfb8c3cc522 Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* | C++: fix lookups for functions with const argsIvan Donchevskii2017-07-111-1/+15
|/ | | | | | | | | Make declarations equal in case they differ only by argument const and/or volatile (13.1.3.4). Task-number: QTCREATORBUG-18475 Change-Id: Id0561fda3b9081b92716a8739ba9963e90b5d709 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* C++: fix code completion of stl containers in internal code modelPrzemyslaw Gorszkowski2017-06-151-5/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fix makes some trick and replaces existing typedef of 'pointer' to the simplest one(only in class unique_ptr), e.g.: template <class _Tp> class unique_ptr { typedef some_strange_things pointer; pointer operator->(); } is replace with template <class _Tp> class unique_ptr { typedef _Tp* pointer; pointer operator->(); } In most of the implementation of unique_ptr it should work. Similar approach is done for std::list, std::vector, std::queue, std::set, std::multiset, std::unordered_set. It is done in this hacky way to omit problems with cyclic and complex resolving of typedefs. Change-Id: I1363dfc5e23d3cd2fa7af7fc27423bfbac2d894d Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* C++: Store template typename argument declarator typeOrgad Shaneh2016-08-191-0/+2
| | | | | | | | Differentiate class from typename. Used by a follow-up commit for pretty printing, preserving the original declarator. Change-Id: I496505f5062abb69d5552e5422db256d49d164c4 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* C++: Add support of ref-qualifier for functions.Dmitry Ashkadov2016-06-221-0/+6
| | | | | | | | | | Now the ref-qualifier (& or &&) of the function declaration is propagated to GUI. For example, 'Refactor' -> 'Add Definition' preserves the ref-qualifier. Change-Id: I8ac4e1cad4e44985e94230aabbd9858a7e929fee Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* C++: Revert lookup to 3.4.2Nikolai Kosjar2015-11-191-52/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...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 <marco.bubke@theqtcompany.com>
* C++: Ignore explicit template instantiationsOrgad Shaneh2015-06-291-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Defined in section 14.7.2 of the standard. Fixes completion for std::string. The following explicit instantiation appears in bits/basic_string.tcc: extern template class basic_string<char>; This is wrongfully considered a specialization for a forward declaration (like `template<> class basic_string<char>` is). Introduce a new Symbol type for explicit instantiations. Use-case: template<class T> struct Foo { T bar; }; template class Foo<int>; void func() { Foo<int> foo; foo.bar; // bar not highlighted } Change-Id: I9e35c8c32f6b78fc87b4f4f1fc903b42cfbd2c2b Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* C++: Support ellipsis on variadic inheritance parsingJohannes Lorenz2015-06-021-0/+6
| | | | | | | Change-Id: I571aefdb1f2aba88ba0c7710f16b6d8ad2e8f5a8 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* C++: Get rid of {Name,Type}::isEqualTo()Nikolai Kosjar2014-05-231-143/+0
| | | | | | | | | ...since it's superseded by the class Matcher. For consistency, rename FullySpecifiedType::isEqualTo() to match(). Change-Id: I07640f9218d814e0350265de45f05929e5d595a9 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* C++: Fix some Matcher::match() functionsNikolai Kosjar2014-05-231-14/+11
| | | | | | | ...before using Matcher instead of {Type,Name}::isEqualTo(). Change-Id: Iba1c04064799fe9c81fe997dbd54fc02b15cdec7 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* C++: Do type and name equality checking in a safe manner.Erik Verbruggen2014-03-271-12/+12
| | | | | | | | | Change the TypeMatcher to also match names, and use two "block" lists in SafeMatcher to prevent infinite recursion. Task-number: QTCREATORBUG-11240 Change-Id: I0367ae795ee6be579b83aeb8d46723c877e4aa75 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* C++: Ignore return type on function overrides comparisonOrgad Shaneh2013-12-281-10/+15
| | | | | Change-Id: I9933e1cc1fb996181e818e2ea0aff76f9255f849 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* Fix MSVC-64 warnings about size_t -> int truncations in C++-lib.Friedemann Kleint2013-09-121-3/+3
| | | | | Change-Id: Ibe6f41ac15df1ec685b0d0766ff568abf6f3ae7e Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* C++: handle non-arguments in function parameter scope gracefulyErik Verbruggen2013-04-091-8/+23
| | | | | | Task-number: QTCREATORBUG-8316 Change-Id: I8897f75f30d3aeaf049cc792060c582ab1e3343d Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* C++: use argumentCount in loops in initializer.Erik Verbruggen2013-03-151-8/+10
| | | | | | | | argumentCount is a more expensive function, so try to call it only once, esp. in loops. Change-Id: I6f0d420352743ec444487ce3f506ef28e5282d1e Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* C++: Fix crash when handling lambdas as argumentsNikolai Kosjar2013-03-061-0/+3
| | | | | | | | Proper fix will follow. Task-number: QTCREATORBUG-8316 Change-Id: I7c86f0b0b0802c310bcce619b5c69ad33ffa0d52 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* C++11: Correct scoping for scoped enums.Christian Kamm2012-10-311-0/+12
| | | | | | | Fixes completion, highlighting and find usages. Change-Id: I1ea12c6a9c7a4f8ba0f9d55e31d6b7986233e7d8 Reviewed-by: hjk <qthjk@ovi.com>
* Remove "icheck build" test.Christian Kandeler2012-09-071-37/+0
| | | | | | | Does not build, is not being maintained, purpose is unclear. Change-Id: I00f3bbc9580b57e3945882a411af502a78f4864f Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
* Added support for override/final and enum classesSergey Shambir2012-07-301-0/+12
| | | | | Change-Id: I6dfe9dd606781046ff5a1ed61315741d2f332cb8 Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
* C++11: handle inline namespaces.Erik Verbruggen2012-02-021-0/+2
| | | | | Change-Id: Iafdcd5bc72d9724e217767ae9c216be4363cc0d3 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* C++: Type deduction for auto-declared variables implementedFlex Ferrum2012-01-311-0/+12
| | | | | | | | | | | Handled to major cases of 'auto' variable declaration: 1. auto var = someInitializer; 2. Q_FOREACH(auto item, collection) or foreach(auto item, collection) In first case type deducted directly from initializer. If variable has no initializer then corresponded error reported. In second case type deducted from '*collection.begin()' expression. Change-Id: Ie930add1648b99440281ae04d973fd6904bc9e46 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* C++: Fix arg. count for functions with function-try-blocksLeandro Melo2011-10-211-3/+4
| | | | | | Task-number: QTCREATORBUG-6343 Change-Id: I71575098c71611dc8514288f7938af4c409ebaa3 Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
* minor stylehjk2011-09-191-1/+1
| | | | | | Change-Id: Id21e8a3962550a1c66d761e718b48a8fcf4053e7 Reviewed-on: http://codereview.qt-project.org/5122 Reviewed-by: hjk <qthjk@ovi.com>
* Added support to C++ symbols rewriting.Roberto Raggi2011-05-171-0/+128
| | | | | | This should simplify full C++ template instantiations. Reviewed-by: Christian Kamm
* remove nokia copyrights from roberto's codeOswald Buddenhagen2011-05-161-31/+0
| | | | | | | | they are lying. nokia has no copyright on this code. and the double license in a single file looks weird. that's why we moved it to 3rdparty/, so it is clear it is not nokia's. Approved-by: legal
* move src/shared/cplusplus/ -> src/libs/3rdparty/cplusplus/Oswald Buddenhagen2011-05-161-0/+1119
Approved-by: legal