| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Amends 0fab5956ea91dc0ee40b4d99605ec26a3720c5c8.
We want to avoid carrying these eight bytes ber Class instance around.
Instead, we now just replace the (anonymous) struct name with the
typedef'ed one.
Note that in C (but not C++), this is possible:
struct S {};
typedef struct {} S;
struct S s1;
S s2;
However, our code model has never respected the extra struct namespace,
so it can already not distinguish between occurrences of "S" and "struct
S".
Change-Id: I55feafea7d3a4a5848e10f7011f633a2ce0f626e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
|
|
|
|
|
|
|
|
| |
... and use it as the struct display name in some places.
Fixes: QTCREATORBUG-26611
Change-Id: I1b127f5705307a0fabd2441ff871162c882927a5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
|
|
|
|
| |
Change-Id: I2103e8047b385b438e58072e8a2689f1889d2724
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
| |
Change-Id: I23486fdfa749fe864c04d5c1a7cede21fb16005b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Depending on context, callgrind sees contributions of >8% to
the total cost of project parsing for these functions. The
functional are actualy executed executed out-of-line, often
for a function body of one "payload" instruction only.
Inlining removes the call/endbr64/ret overhead.
Change-Id: I6886f08e322fcaa4e0f54d424279e0a8c24e4718
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
... to the function type.
This fixes the issue for function *definitions*. For function
*declarations*, we need to amend the parser.
Task-number: QTCREATORBUG-24894
Change-Id: I02043d8b974c2c64dcd739c7e05ce44fd277b5d3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
... when comparing type names. For instance, this is relevant when
deciding whether to offer the "Apply signature changes" refactoring
action.
Add fallback code for function lookups, which was relying on the relaxed
semantics for parameter types.
Fixes: QTCREATORBUG-9856
Change-Id: I2001b77034ff15e96a23e3359d19654d0f43f60b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This applies for e.g.
* "Add Definition..." (on function decl)
* "Move Definition..." (on function decl)
* "Insert Virtual Functions of Base Class" (on class specifier)
Fixes: QTCREATORBUG-11849
Fixes: QTCREATORBUG-19699
Change-Id: I0d259bc1782470f3b3f19617230005a5594a5cca
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
|
|
|
|
|
| |
Change-Id: I1bed5e85a5b7948d08502a72a10f80baa075c204
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recently tons of warnings show up for presumably "problematic"
singned <-> unsigned and size conversions.
The Qt side uses 'int', and that's the biggest 'integration surface'
for us, so instead of establishing some internal boundary between
signed and unsigned areas, push that boundary out of creator core code,
and use 'int' everywhere.
Because it reduces friction further, also do it in libcplusplus.
Change-Id: I84f3b79852c8029713e7ea6f133ffb9ef7030a70
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
| |
Change-Id: I8b98d86e7d5321e2420d388abba159474d7ad799
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/plugins/debugger/debuggerdialogs.cpp
src/plugins/debugger/gdb/remotegdbserveradapter.cpp
Change-Id: I1ae77869887a8d9ef2a33439f2733315db9e0cf0
|
| |
| |
| |
| |
| |
| |
| | |
Task-number: QTCREATORBUG-18903
Change-Id: I852b5de453d44c16adffd44c89900cfb8c3cc522
Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
|
|/
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
...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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
...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>
|
|
|
|
|
|
|
| |
...before using Matcher instead of {Type,Name}::isEqualTo().
Change-Id: Iba1c04064799fe9c81fe997dbd54fc02b15cdec7
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: I9933e1cc1fb996181e818e2ea0aff76f9255f849
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
| |
Change-Id: Ibe6f41ac15df1ec685b0d0766ff568abf6f3ae7e
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
|
| |
Task-number: QTCREATORBUG-8316
Change-Id: I8897f75f30d3aeaf049cc792060c582ab1e3343d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
Proper fix will follow.
Task-number: QTCREATORBUG-8316
Change-Id: I7c86f0b0b0802c310bcce619b5c69ad33ffa0d52
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
|
|
|
|
|
|
|
| |
Fixes completion, highlighting and find usages.
Change-Id: I1ea12c6a9c7a4f8ba0f9d55e31d6b7986233e7d8
Reviewed-by: hjk <qthjk@ovi.com>
|
|
|
|
|
|
|
| |
Does not build, is not being maintained, purpose is unclear.
Change-Id: I00f3bbc9580b57e3945882a411af502a78f4864f
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
|
|
|
|
|
| |
Change-Id: I6dfe9dd606781046ff5a1ed61315741d2f332cb8
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
|
|
|
|
|
| |
Change-Id: Iafdcd5bc72d9724e217767ae9c216be4363cc0d3
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Task-number: QTCREATORBUG-6343
Change-Id: I71575098c71611dc8514288f7938af4c409ebaa3
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
|
|
|
|
|
|
| |
Change-Id: Id21e8a3962550a1c66d761e718b48a8fcf4053e7
Reviewed-on: http://codereview.qt-project.org/5122
Reviewed-by: hjk <qthjk@ovi.com>
|
|
|
|
|
|
| |
This should simplify full C++ template instantiations.
Reviewed-by: Christian Kamm
|
|
|
|
|
|
|
|
| |
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
|
|
Approved-by: legal
|