| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| | |
Change-Id: I5f6e5fa14ea51cd9e61a9e2e96c110ca618be429
Reviewed-by: André Hartmann <aha_1980@gmx.de>
|
| |
| |
| |
| |
| | |
Change-Id: Iafbbdcca23db38d82bbc5bb24a39dac2a6d0a764
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
| |
| |
| |
| |
| |
| | |
Task-number: QTCREATORBUG-24098
Change-Id: I192245125f04f8350597bbe481d80d3f8ba0cae0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|/
|
|
|
|
|
|
| |
The type-id in an alias declaration can also define a new type.
Change-Id: I65dc397d2526c56334676c6ab522564f6748d594
Task-number: QTCREATORBUG-24875
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
|
|
|
|
|
|
| |
... in the "Find Usages" results.
Change-Id: Ib399bf762c717b7d4439be26b9180574aefce7e3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
|
|
|
|
|
|
| |
... when checking usage types.
Change-Id: Ic875f3bcae9cf045dbb062670e8cf941de533404
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
|
|
|
|
|
|
|
|
| |
... when trying to find out the usage type of a function argument.
Otherwise, we potentially ignore functions which have additional
overloads with a shorter parameter list than is required for the call.
Change-Id: I02bf2cb359ea9d506e2644388234dc28fa072445
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
That is, find out whether a certain access was a read, a write, a
declaration or something else, and report the result to upper layers.
Follow-up patches can make this information visible to users.
Task-number: QTCREATORBUG-12734
Task-number: QTCREATORBUG-19373
Change-Id: Iee79e39dd1eb5a986a7e27846991e0e01b2c3a2f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
... on Windows.
We need to open the test file in text mode. Otherwise the raw string
literal will contain carriage returns. As these get dropped by
QTextDocument, the offsets will be inconsistent with the ones reported by
the tokens, causing the test to fail.
Change-Id: I161a3f5791c33416ff732f90fd615cf39d8152ce
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
|\
| |
| |
| | |
Change-Id: I1c426d95eedd82bd4470a64a9bafd734d23081ac
|
| |
| |
| |
| |
| |
| |
| |
| | |
... regarding unfinished macro calls.
Amends df0ffd8bb8.
Change-Id: Ia7b8752860ac9207e702697cbee87f16a39dd1dd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
|/
|
|
|
|
|
|
|
| |
After the arrow, the state is still the same, as now a type is expected.
Only after the opening brace does the actual function start.
Fixes: QTCREATORBUG-18497
Change-Id: I7bf18fbd6907d36f8869af3a78ad617cf0ee9dbb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
|
|
|
|
|
| |
Task-number: QTCREATORBUG-24098
Change-Id: Icea21e446173537d8fdb8113f1eff7d7176c34b3
Reviewed-by: hjk <hjk@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Code snippet:
template<class T> struct MyStruct { int value; };
int main() {
auto s = MyStruct<int>();
s.value; // "value" is not found
}
This fixes find usages for unique_ptr declared as auto like this:
auto ptr = std::unique_ptr<MyStruct>(new MyStruct());
ptr->value;
Also fixes in-place constructors:
std::unique_ptr<MyStruct>(new MyStruct())->value;
Fixes: QTCREATORBUG-15364
Change-Id: I8d452a77fe85e63665ec8d4c4afbcf8aad063121
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
At some point in the preprocessing stage, some tokens get "squeezed", so
their associated string no longer refers to the document content, but
only to their own symbol. However, there is at least one context that
operated under the assumption that the token's offset still pointed into
the "global" string. As the token's offset is zero after parsing, this
lead to the same piece of code being preprocessed in an infinite loop.
Fixes: QTCREATORBUG-19525
Change-Id: I231ba51811cfa0b5c6dfe7f75fe0384472252c6f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Code snippet:
void bar(); // call find usages for bar from here
void foo(int bar); // bar from here should not be in results
Add test for member function false positives, that is part of
QTCREATORBUG-2176. That was already fixed before.
Fixes: QTCREATORBUG-2176
Change-Id: I9a079caa83bbaea1edb7ba6aeb151d4d4c77952f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Catch test functions defined with function-like macros.
To speed-up semantic analysis, find usages does not expand function-like
macros.
Semantic fails with "expected a function declarator" on such functions
and skips function body.
To avoid that, we create dummy function type specifically for this case
Change-Id: Ie2f2464ee57aa4dc86eed07b8b699458f95c0266
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Fix parser to not fail on TemplateId without parentheses, for example:
int i = foo<int> + foo<char>;
This fixes std::pair structure parsing in MSVC headers and find Usages
to work with pair->first and pair->second.
Change-Id: Ic300ea99d44a749705430d5eb47b2744715af995
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
| |
Fixes: QTCREATORBUG-23502
Change-Id: Ie80fe9aa77ffbf0b9ecc531841e78f2bd80de37e
Reviewed-by: Cristian Adam <cristian.adam@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>
|
|
|
|
|
|
|
|
|
|
|
| |
Otherwise, we trip over uses of operators from the standard
library such as std::chrono's operator"" ms(), potentially breaking
basic code navigation.
Amends 425811291d.
Fixes: QTCREATORBUG-24067
Change-Id: I3b2863ce88ee3787414e7a1acdf25f368041cdb4
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
| |
Change-Id: I90ae2da3a82bff2e966c4327cf8e42f7ebbddd27
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use central rpath.pri for setting RPATHs and qttestrpath.pri for tests.
Simplify install names of plugins and libraries on macOS to be just
@rpath/libName, which follows convention better and makes setting up
RPATHs easier.
Preparation for moving tools one directory level down on macOS, to
be able to add a qt.conf for the tools generically.
Task-number: QTCREATORBUG-23120
Change-Id: I16625d48904abd3a7f4c2ad7bbba5916cdc400cd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
| |
Source code needed adjustments though.
Change-Id: I78b4610a6bb895a385c7c30a6c92c97a276b89dd
Reviewed-by: hjk <hjk@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>
|
|
|
|
|
|
|
|
| |
For some reason, Q_UNUSED includes already a semicolon, adding one
on the user side creates an additional empty statement.
Change-Id: I9c5e8fac381345a60792cb75e2938fd53958d3b0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
C++14 supports the use of single quotes inserted between integer digits
as a separator. Updates the built-in C++ code model to recognize such
quotes. This fixes highlighting and indentation issues.
Change-Id: Ic35ce93060b96700a11d108dce1f3cf6c4543632
Fixes: QTCREATORBUG-14939
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
| |
Change-Id: I677614dc8f9de503131d8ac490a723c9fc5f7beb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|
|
|
|
|
|
|
| |
The alternatives have been around since 2012.
Change-Id: I0aa15d59efe8a547e2ad622ffda689746960d48c
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Based on Tobias Hunger's work from a few months ago.
The CMake configuration needs libclang and Qt paths specified as
CMAKE_PREFIX_PATH.
Auto tests are run with "ctest". At the moment the pass rate is 87%.
Change-Id: Iba98e39bf22077d52706dce6c85986be67a6eab0
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|
|
|
|
|
|
|
|
| |
Without Overview::BindToIdentifier, a space between
return type(endsWithPtrOrRef) and identifier should be added.
Change-Id: I3cd2d053bf137b35a58e7422f45cbd5b96eeb151
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Arguments of funstion-like macro may contain the name of this
macro. The attempt to expand it results into infinite recursion.
Patch solves that by saving the macro name until the arguments
are collected to determine that it should not be expanded.
Fixes: QTCREATORBUG-21642
Change-Id: Iafb404ecd3959a2f1011c12c1c3f1c0c54ed3547
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This amends the obviously wrong
de975aca4f08141b1c6475e58f5cfa316fdd1350, which did not honored nameless
enum specifiers.
This fixes e.g. "Find Usages" for declarations following "enum {};".
Change-Id: Id98c074156f576b9a63e6c25dab38721ca34e496
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
|
|
|
|
|
|
| |
Task-number: QTCREATORBUG-16774
Change-Id: I3de3ac65810213e21c9a3bafef2474d252e191f7
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While parsing a document Bind::asStringLiteral() Token::spell() was
called for a raw string literal token with a Token::literal nullptr.
This is due scanRawStringLiteral() not properly aborting for
invalid/incomplete code and that the code paths handling
multi-line-raw-strings were not limited to the highlighting case.
Address both cases.
Task-number: QTCREATORBUG-18941
Change-Id: I489d288ccbd7b59be396dada846613ff555436cf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
|
|
|
|
|
|
|
|
| |
With the built-in model, which affects basic highlighting.
Task-number: QTCREATORBUG-17720
Change-Id: I7369d7288d9c2c8e5ef36fc27549121014527e58
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|\
| |
| |
| | |
Change-Id: I9006dd493707ae626ae3502541599c8789e1aab0
|
| |
| |
| |
| |
| |
| |
| | |
Task-number: QTCREATORBUG-16086
Change-Id: Ic2f3fd38ae6cc93725bc214c24320f40a0a519a8
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|
|/
|
|
|
|
|
| |
Format initializer lists code style like.
Change-Id: Ib82c235e4ba7dc75ee96a7abc0c47eff7b0a9013
Reviewed-by: hjk <hjk@qt.io>
|
|
|
|
|
|
|
| |
Do not require directly passing the enclosing template.
Change-Id: Ie03bc58338fe003677a5f5311d86d70f499373ee
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
In some (legacy) C files, new and delete may be used for regular identifier.
There are some limitations:
* Header files have no 'implicit' type, and may be parsed as C++ or ObjC depending on the
other files in the project.
* QMakeProject use a single ProjectPart for C and C++ files, so there will still be the issue.
Change-Id: Iec11687b35f7ccf1e7c0d091b143ae90d950e440
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
| |
Change-Id: Ib228184e1259585eeac61b9196195c39a9550cb9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
...with MSVC2013.
tst_lexer.cpp(406) : error C2398: Element '1': conversion from
'CPlusPlus::Kind' to 'unsigned int' requires a narrowing conversion
Change-Id: I1c9415cb02d2f0fa85d48a1abbc688d8f53b5b43
Reviewed-by: Christian Stenger <christian.stenger@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>
|
|
|
|
|
|
|
|
| |
The current code always ends up setting the token to T_GREATER_GREATER.
Change-Id: If75ff1f5bccffd5918ec2bf491724cd0981220ae
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
|
|
|
|
|
|
| |
Task-number: QTCREATORBUG-15564
Change-Id: Iab1b60e19448202432f98295c89769cd376aa03f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/plugins/debugger/debuggerruncontrol.cpp
src/plugins/projectexplorer/projectwizardpage.cpp
src/plugins/projectexplorer/xcodebuildparser.h
src/plugins/qmldesigner/qmldesignerplugin.cpp
src/tools/clangbackend/ipcsource/translationunits.cpp
Change-Id: Ibf0857cf8dbf95fc9ac13d5c2112b3f4a2ca7de6
|
| |
| |
| |
| |
| |
| | |
Task-number: QTCREATORBUG-16146
Change-Id: Ib2a790954517859acd7ca5f16c7d889d28208fb0
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|\ \
| |/
| |
| |
| |
| |
| |
| | |
Conflicts:
src/plugins/projectexplorer/session.cpp
src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp
Change-Id: I6946139f5e5fa3a9cdbb322fd50be248e2c0133f
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Symbol::_fileId can be null if the Symbol was created with a null
translation unit. That is the case for temporary symbols created for
lookup purposes (CreateBindings has a _control with no translation unit
and thus creates symbols with no fileId).
Task-number: QTCREATORBUG-15967
Change-Id: Iee518b39ba3b636fe1658e74179db3aad054d6f2
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
|