| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Until now std::vector::at() was used to access the elements. This is
handy for debugging since an exception is thrown for invalid indices,
but it does not stop Qt Creator from crashing because exceptions are not
caught.
This is especially a problem for the parser, which has to look ahead via
LA(n), which accesses TranslationUnit::_tokens.
With this patch, explicit bounds checking is done before accessing the
elements and thus calls to
std::vector::at() // bounds checking, throwing out_of_range
were replaced by calls to
std::vector::operator[]() // no bounds checking, not throwing out_of_range
Measuring the parse time for the Qt Creator project shows that there is
no slowdown. In both cases, with and without the patch, about 15s are
needed on the authors machine.
Task-number: QTCREATORBUG-10453
Change-Id: I32b12a526ff7199bcadfc21a3deb5354063a3e3b
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
|
|
| |
Uncommented in e088541c0
Change-Id: Ia9685b815523ab61a8780e9f5686a5d713eec842
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
| |
Change-Id: I4e2df6992b446adec662ab07671acd41715e41fd
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
|
|
|
|
| |
MEMBER was added in Qt5.
Task-number: QTCREATORBUG-10068
Change-Id: Ic6c15a0e5ee8981ab98e4c12fc1521dc281b731f
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
Note: Since not all autotests are able to run from an installed location,
we need to be able to start them from the build directory, which
in turn forces us to set a destination directory for libraries and plugins,
so they will be found at run-time.
Change-Id: Idcf7e1333dfa6e9dbf745391b78c035f842ccc5a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
|
|
|
|
|
| |
Change-Id: Ie405a9339d13615efb1113614a7dcd7069849b4f
Reviewed-by: David Schulz <david.schulz@digia.com>
|
|
|
|
|
| |
Change-Id: Id2ced5e41686387e67a7bb8419fe1547b23779c7
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
...otherwise they add up and subsequent tests checking for the error count will
fail:
FAIL! : tst_AST::objc_try_statement_1() Compared values are not the same
Actual (diag.errorCount): 5
Expected (0): 0
Loc: [/home/nikolai/dev/creator/qtcreator-master/tests/auto/cplusplus/ast/tst_ast.cpp(1400)]
...
Change-Id: I8b4356331e95dceb1e99bb26e6ebf4591d70a08c
Reviewed-by: David Schulz <david.schulz@digia.com>
|
|
|
|
|
| |
Change-Id: I366733ec821ee264f182f4d4a3cf69cdada20cfc
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/plugins/cpptools/cppcompletion_test.cpp
src/plugins/cpptools/cpptoolsplugin.h
src/plugins/projectexplorer/customtoolchain.cpp
src/plugins/vcsbase/command.cpp
Change-Id: Ie7b3c9e136c0748b41320227c757471259339b48
|
| |
| |
| |
| |
| |
| |
| |
| | |
Task-number: QTCREATORBUG-9855
Change-Id: I985745530d93e1c191442431a7a9449a1c4c059a
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
example code:
struct S { int s; };
namespace std
{
template <typename T>
struct shared_ptr
{
T* operator->();
};
}
namespace NS
{
using std::shared_ptr;
}
int main()
{
NS::shared_ptr<S> p;// for this shared_ptr
return 0;
}
Fixes:
* find usages
* follow symbol
* highlighting
* marking
Task-number: QTCREATORBUG-7978
Change-Id: I28994c960b87ddd400e1d7b860fca6c6683bbb5a
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
No semantic analysis yet, but this prevents the parser from generating
bogus diagnostics.
Task-number: QTCREATORBUG-9309
Change-Id: I2ec575a8474cd51bfa97b17678d3da71ab8dcd7a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This test is marked as failing, because the bug is still there. To be
fixed when we re-use the generated token stream of the preprocessor as
input for the parser.
Task-number: QTCREATORBUG-9799
Change-Id: I454a9939aa188a6ff934a11699232f39c828bc7b
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
| |
| |
| |
| |
| | |
Change-Id: Icff6e9310a45e66b573fb2a6623a10e025c43539
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
| |
| |
| |
| |
| |
| | |
Change-Id: Iac4156b872fe81c1714857c24363bf171e7d61cd
Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/libs/cplusplus/FindUsages.cpp
tests/auto/cplusplus/findusages/tst_findusages.cpp
tests/auto/debugger/tst_dumpers.cpp
Change-Id: I20e2002c7b25cc25d8120922fa9b52e59db498e3
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When the cursor is on the name of declaration of a templated function,
then since f93758b8e1d68ed28dc1a84b71c906d58784cb70 the scope returned
by Document::findScopeAt is the scope of the template declaration.
Before it was the parent scope of the template declaration.
The check in FindUsages::checkCandidates did not check all combinations
of template(-child symbol) scopes for the searched symbol and its
occurrences.
Task-number: QTCREATORBUG-9749
Change-Id: Idc84a2ba718721ce54683a67635a93352784ddd1
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|\ \
| |/
| |
| |
| |
| |
| | |
Conflicts:
qbs/pluginspec/pluginspec.qbs
Change-Id: Ic8e992623b9eda8913ee473c779a8df27643ccc9
|
| |
| |
| |
| |
| |
| | |
Change-Id: Iabc1330633e5568b7c94059d4286c93adfecb1a2
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|\ \
| |/
| |
| |
| |
| |
| |
| | |
Conflicts:
qtcreator.pri
qtcreator.qbs
Change-Id: I5d2018d3437b99bcdffa92bf1a212f42923c4fad
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Task-number: QTCREATORBUG-7336
Change-Id: I926e82499325e4fe38e25cc7a6158050f7fc0e82
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|\ \
| |/
| |
| |
| |
| |
| | |
Conflicts:
src/plugins/fakevim/fakevimhandler.cpp
Change-Id: I8101f18b87859924644471817d4f1408790d5628
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For the quick fix AddIncludeForUndefinedIdentifier, if no class is found
via the locator, check the "Qt include paths" for a header file with the
same name as the class name.
Task-number: QTCREATORBUG-9538
Change-Id: I13c86844c2ff653fa479dc91eb109af2a6d76fae
Reviewed-by: Lorenz Haas <lykurg@gmail.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This change addes support for class, enum definition inside blocks({}) or
functions, e.g.:
void f()
{
struct S
{
int bar;
};
S s;
s.bar;
}
It fixes:
* code completion
* highlighting
* follow symbol
* marking
* find usages
It fixes also problem with namespace aliases inside blocks or functions.
This change can have also impact on performance(there are additional processing)
Task-number: QTCREATORBUG-166 (namespace aliases inside function/block)
Task-number: QTCREATORBUG-3620
Task-number: QTCREATORBUG-6013
Task-number: QTCREATORBUG-8020
Change-Id: Iaea6c6dfe276f1d7b2279b50bdd2e68e375d31eb
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Fix find usages for template class(class name and template parameters)
or template function(template parameters).
Fixed:
* marking
* find usages
* follow symbol
Change-Id: I22fdbc11260cbd8ee9aafdd76aaeee0f4f49f9fd
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By lexing the first token after a macro call (meaning: the token after
the closing parenthesis (which was passed to handleFunctionLikeMacro
which in turn pushed it back into the token buffer)), a token buffer
might be popped, which unblocks the macro that generated the actual
param pack. The effect was that if this happens in the expansion of a
recursive macro (with parameters!), the preprocessor ended up in an
infinite loop.
Task-number: QTCREATORBUG-9015
Task-number: QTCREATORBUG-9447
Change-Id: I0d83c59188ec15c4a948970e9fa944a17d765475
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
|
|
|
|
| |
...by detecting include groups (separated by new lines, include types
and same dir prefix).
Task-number: QTCREATORBUG-9317
Change-Id: I73e80fdc715104901cb2d4f5b15b4cab5d04d305
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
|
|
| |
Task-number: QTCREATORBUG-9386
Change-Id: Ia68f3866c122ca5261dd73b2c740b47fb15744fc
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
|
|
| |
Thanks to Jesper K. Pedersen for the fix!
Change-Id: Ie49c3352e26a9632b1500596b00d559bfe932dff
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
|
|
| |
Task-number: QTCREATORBUG-9314
Change-Id: I59c026cce02b85eeb54f4d10d5c9fb0c59bfe28a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Doing so resulted in an incorrect position for the EOF token when the
preprocessed output would be parsed. That in turn leads to incorrect
insertion positions for refactoring actions.
This is especially true when a file contains only preprocessor
directives: the EOF token would point to line 1 column 1, which is
usually not the place where code should be inserted.
Change-Id: I7d359aa7a6c04bc52c8b873fd49ad6afc3a77319
Reviewed-by: hjk <hjk121@nokiamail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
It was missing colorizing and follow symbol template function parameters in case of:
* returning value
* use it as qualified name
Task-number: QTCREATORBUG-6861
Change-Id: I4226199e1f296cfe5a373783ebbc633e32fc9bcd
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
|
|
| |
Task-number: QTCREATORBUG-9170
Change-Id: I4cac9124558c1d4f0722192246f3fbeea61d3d7d
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
|
| |
Task-number: QTCREATORBUG-9323
Change-Id: I52dfe8c03da14fc08723c3878fec0f6e9150152c
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
| |
Change-Id: I898668a91eb7d3fa18c0a8d3e7e7507f0fb5a917
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
doc/src/qtquick/qtquick-components.qdoc
doc/src/qtquick/qtquick-designer.qdoc
qtcreator.pri
qtcreator.qbs
src/plugins/cppeditor/cppinsertdecldef.cpp
src/plugins/qnx/qnxruncontrolfactory.cpp
Change-Id: I0a37a07c42719bc0d9ef5b3ac4641d01a63c0d88
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Caused by a dangling pointer of a template instantiation which had been
cloned into the wrong control. The fix is to remove that control and
refer to the control of the bindings (which is the correct one).
Change-Id: I951a60f2e613aae1e4ac901ce99c820212018709
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If type is not found we try to find 'using' declaration for this type.
Task-number: QTCREATORBUG-7903
Change-Id: I569db9e1a8504a5da3115ebbed2e823d5924f6ca
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|\ \
| |/
| |
| |
| |
| |
| | |
Conflicts:
src/plugins/qmldesigner/components/formeditor/abstractcustomtool.cpp
Change-Id: I4e0a85795e7f4bfcdc21d106517517b527f85104
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Preprocessor did not correctly handle when variadic macro arguments were not
provided at all, if there were other arguments: macro was not expanded
in case only the non variadic arguments were given.
#define MACRO(...) used to work fine for 0 or more arguments.
#define MACRO(ARG0, ...) used to work only for 2 or more arguments, now fixed.
Change-Id: I64e9199ceccae05618a49931c2adad8e4f9471ba
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix:
* highlighting
* find usages
* follow symbol
* code completion
Task-number: QTCREATORBUG-6497
Task-number: QTCREATORBUG-8963
Task-number: QTCREATORBUG-3610
Task-number: QTCREATORBUG-7579
Change-Id: I3dcaf1c515d0199c3e6bee72284fbb40064686ee
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Q_UNREACHABLE was introduced in Qt5, so using it impossible to compile
the tests with Qt4.
Change-Id: I0ed23ad9390b1428513a7a0c975dd8fb72efb001
Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Moved TextEditor::SemanticHighlighter::Result to
TextEditor::HighlightingResult
- Moved SemanticInfo::UseKind to CppHighlightingSupport::Kind
Change-Id: I14faab1891ca691a0691cfd9243edf19fcd3d3df
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix instantiation of templates(by cloning original symbols). Assigning of scope
for cloned symbol is taken from the symbol which is used to instantiate.
Task-number: QTCREATORBUG-9098
Change-Id: I066cc8b5f69333fabdaf2d4466b205baf08bd3f1
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
| |
| |
| |
| |
| | |
Change-Id: Ie0133893d8b8d35ea2aa599cb8f7d5c2cc55271e
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|\ \
| |/
| |
| |
| |
| |
| |
| | |
Conflicts:
src/plugins/cpptools/cppchecksymbols.h
src/plugins/qmldesigner/components/formeditor/resizecontroller.cpp
Change-Id: I887ba071fa637ad44e39bcae581738fa078a6612
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It fixes:
* highlighing
* find usage
* follow symbol
when function of class has the same name as:
* local variable
* template parameter
* other struct/union/class/enum
* function argument
in function scope.
Task-number: QTCREATORBUG-8902
Change-Id: Iddc0f764af689babb40d39460d174bac7b919b31
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Sergey Shambir <sergey.shambir.auto@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixed:
* code completion
* highlighting
* find usage
* follow symbol
Task-number: QTCREATORBUG-9005
Change-Id: I3fcc2638482ca1071c1aa7b6aab0d4dd128595bb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixed:
* highlighting
* follow symbol
* find usage
Task-number: QTCREATORBUG-9006
Change-Id: I34a42f8665335857f41290217e7265e8a752455b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Sergey Shambir <sergey.shambir.auto@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|