| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|/
|
|
|
|
|
| |
Kudos to cgmb and https://github.com/cgmb/guardonce
Change-Id: Ifa8970734b8d43fd08c9260c645bdb0228633791
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to section 2.5 from the standard:
""" If the input stream has been parsed into preprocessing tokens up to
a given character: ... Otherwise, if the next three characters are <::
and the subsequent character is neither : nor >, the < is treated as a
preprocessor token by itself and not as the first character of the
alternative token <:. """
Change-Id: Ib9cdac61e3c2243d1bc1d4471a09ae6bd839fdda
Task-number: QTCREATORBUG-13253
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I9204b827c60b283cc4e6b88c810b31eb7587c7db
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Trigraphs must only be parsed before/during preprocessing. The preprocessor
will now replace trigraphs with their standard form, and re-lexing in
TranslationUnit will not try to parse any trigraph.
Also added a few missing trigraphs: ??=, ??', ??! and ??-.
Task-number: QTCREATORBUG-13253
Change-Id: I1723ed53b00090b878c22b83b7e963b647b65f72
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Ic9709ac4e76a199bb9fdd7ed231d48d498201de6
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
Implement selection expanding / shrinking, that is aware of C++
semantics, thus giving smart selection changing.
Change-Id: I1386a20597fa6bb85c3aa0d8ddfb87cdb3fd7c38
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|
|
|
|
|
|
| |
* Update license information in tests directory
Change-Id: I311441dd37d053ca3175e44b284258e232ee93e0
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changing a function signature from const to non-const is not recognized as a
changed, and doesn't trigger the "Apply Function Signature Changes" quickfix.
For example:
void func(Foo &var);
void func(Foo &var) {} // Add const before Foo, quickfix is not triggered
Change-Id: I71ae41765d66df69204abd085fdfcfcb2d605f4c
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
MSVC2010 supports all combinations of upper- and lowercase U/I.
Task-number: QTCREATORBUG-15554
Change-Id: I0106e6b5038a62aebe5a6c1eb0467d693befb4b0
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I4c6843b5bae06f09e4b3e41eabb1b3e0e9a8b6a2
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I93dac08a62be467918dbc9f72239d34191a81fd6
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Parser parsed the pattern as an enum declaration the name of
which is a conversion operator. Add check to disallow keywords
after enum-key (enum, enum class, enum struct).
Add tests tst_AST::enumDeclaration and
invalidEnumClassDeclaration.
Task-number: QTCREATORBUG-15341
Change-Id: Ia037f00184c1d7e5b0374f39331bb6748f8d90b1
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Underlying C++ model sometimes marks C++ object instantiation using initializer
as a (forward) function declaration. This leads to incorrect highlighting of
object variables as if they were function calls.
C++ model however marks in this case (and not any other case) such symbols as
ambiguous function types, see CPlusPlus::Bind::visit. This change skips such
ambiguous functions for highlighting as function call.
Also add test case for related bug report.
Task-number: QTCREATORBUG-15212
Change-Id: Ifde8db407f2fa8275a3f991bfa3d3b73eca8c14e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A recursive template generates infinite expansions.
Consider the following example:
template <class R1>
struct Base
{
};
template<typename R>
struct Derived :
Base<
typename Derived<typename Base<R>::type>::type,
typename Derived<typename Base<R>::type>::type
>::type
{};
R is instantiated as Base<R>::type, which causes another
instantiation of R into Base<Base<R>> etc...
This is not a solution, but a workaround.
Task-number: QTCREATORBUG-15141
Change-Id: Ib04f70275e07919e2cb6c7fb61a2045bd52f4a7d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|
|
|
|
|
| |
Change-Id: I338352eaf6372316d2dc8f0f3ad961b7e8d8cbdc
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Iacb728715b11ca3a9f82d82cca49889eea9dd59b
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Finding the class definition for a forward declaration or finding the
function definition from its declaration is mostly determined by the
file iteration order. Documents with the most common path prefix are
checked first.
This works fine as long as the files of your project have a common
ancestor. If that's not the case, FollowSymbol might take you to the
definition within another project.
Fix that issue by considering the project part id when constructing the
file iteration order. Since the cached file iteration order now depends
on the projects, ensure to clear it if projects are added, changed or
removed.
Task-number: QTCREATORBUG-15116
Change-Id: I529166bac363959c9fee0b946747fd0370a88809
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code model failed to parse the noexcept operator which is often
used in noexcept specifiers, e.g.: "void f() noexcept(noexcept(g()));"
Consequently some c++11 headers such as unordered_map, array
and unordered_set could not be parsed and no code completition was
available. I have created the NoExceptOperatorExpressionAST class
which is created whenever a noexcept token is found in an
expression with operator precedence. The noExcept test case
in the cplusplus/cxx11 test now contains a function that
uses the noexcept operator.
Fixed noexcept operator parsing
Added the test requested by Sergey Shambir, which then revealed that
i had not implemeneted the noexpect operator parsing according to the
c++ specification.
As stated here http://cpp0x.centaur.ath.cx/expr.unary.noexcept.html
the noexcept operator is a unary-expression that contains an
expression (and not a constant-expression). This should now be fixed.
Change-Id: Id4a99a43b660bd83e7680274491d99a698b57094
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|
|
|
|
|
| |
Change-Id: I9ca253a6a2296912eafe139ce53f4f9779097248
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This mainly reverts
commit 81721f678122bc66213b5f2a5fbf36c43e5e1a35
C++: Fix resolving of recursive typedef
commit 2070431d8ca867acfb4391c275cd82caff4d711a
C++: Fix resolving of partial specialization
and some bits of other changes due to dependencies. It also reverts
commit e0594fc9b906a32f5c8ac70265490cf86044676f
C++: Fix expensive lookup for boost
which attempted to solve the upcoming problems.
Task-number: QTCREATORBUG-14741
Task-number: QTCREATORBUG-14889
Task-number: QTCREATORBUG-14962
Change-Id: I3f9e1f97199e5199b71da394fc27051c7709bd1f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
...when dealing with UTF8 bytes.
std::isspace() expects unsigned char, not char.
Change-Id: I3f9b5e347d79cf94015cc99f8797d5feab406151
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
...for two regressions that were introduced by
commit e0594fc9b906a32f5c8ac70265490cf86044676f
C++: Fix expensive lookup for boost
Change-Id: I1fa01e626da480ca53e04b4709fec458378e7aef
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ASTPath uses TranslationUnit::getPosition(), which returns reasonable
results for:
1. non-expanded tokens
2. expanded but not generated tokens
The expanded *and* generated tokens case is not handled since there is
no reasonable mapping from generated tokens to a continuous line/column
information. Consider:
#define DECLARE_FOO int foo; // Multiple generated tokens
DECLARE_FOO // ...can be mapped to this line, but to which columns?
Since the result where not valid for the expanded and generated case,
ASTPath took the wrong branches. Avoid this by skipping generated
tokens.
Change-Id: I33a2e0f62917f87d691b19feaeef67b09ea8d563
Task-number: QTCREATORBUG-13386
Task-number: QTCREATORBUG-13390
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.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>
|
|
|
|
|
|
|
|
|
|
| |
Use-case:
template<class T>
using Foo = Bar<T>; // T not highlighted
Task-number: QTCREATORBUG-9944
Change-Id: I04cb62ea6a21f158f7fb4fb7ac79ccd6eb1bbfbb
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>
|
|
|
|
|
|
| |
Task-number: QTCREATORBUG-9944
Change-Id: I614571e05039f24b7d56abdddc15f912581f68f1
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|
|
|
|
|
|
| |
It assumes LF line-endings
Change-Id: I7bfeb4b6d4db2fd6457030e2d21c240534de9cd2
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use-case:
template<typename _Tp>
struct Temp { typedef _Tp value_type; };
struct Foo { int bar; };
void func()
{
Temp<Temp<Foo> >::value_type::value_type *p;
p->bar; // bar not highlighted
}
Task-number: QTCREATORBUG-14237
Change-Id: Ie0b21b81526d610437ed2d2877083bb929c25047
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use-case:
struct Foo { int bar; };
template<typename T>
struct Base { typedef T F; };
template<typename T>
struct Derived : Base<T>
{
typedef typename Base<T>::F F;
F f;
};
void func()
{
Derived<Foo> d;
d.f.bar; // bar not highlighted
}
Task-number: QTCREATORBUG-14218
Change-Id: Ic0b22b2f8adf80ff88a2f8b7359c276a744f89e8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|
|
|
|
|
| |
Task-number: QTCREATORBUG-14352
Change-Id: I2ce4bc1d0dba2414afe050e80607b581686081a9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
Missed a spot in ad4cb444fbfd1f3f4747a0988a196120d3a0c208
Task-number: QTCREATORBUG-14141
Change-Id: I1a6a25ce3e9c2a680e1b8eebec01a17749cdb026
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use-case:
template<typename T>
struct Temp { T t; };
struct Foo { int bar; };
void func()
{
typedef Foo *pointer;
Temp<pointer> temp;
temp.t->bar; // bar not highlighted
}
Task-number: QTCREATORBUG-14351
Change-Id: I13ca6145a0069bbc7a7207f69b43011c69ec72c7
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use-cases:
template<typename T>
struct Traits { typedef typename T::pointer pointer; };
template<typename _Tp>
struct Traits<_Tp*> { typedef _Tp *pointer; };
struct Foo { int bar; };
// 1
template<typename T>
class Temp
{
protected:
typedef Traits<T> TraitsT;
public:
typedef typename TraitsT::pointer pointer;
pointer p;
};
void func()
{
Temp<Foo *> t;
t.p-> // complete
}
// 2
class Temp2
{
protected:
typedef Foo *FooPtr;
typedef Traits<FooPtr> TraitsT;
public:
typedef typename TraitsT::pointer pointer;
pointer p;
};
void func2()
{
Temp2 t;
t.p-> // complete
}
Task-number: QTCREATORBUG-14141
Change-Id: Id3459671117c0c81bcde7c9714b42750634c0225
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|
|
|
|
|
|
| |
Runs much faster than plugin tests.
Change-Id: Ie90d10c7d88b63f36bc00077af67d67e24cb4c50
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Example:
struct Foo {};
struct Bar {
template <typename T>
T *templateFunc() { return 0; }
};
struct Test {
Bar member;
void testFunc();
};
void Test::testFunc() {
member.templateFunc<Foo>(); // "templateFunc" and "Foo" outside of FindUsages
}
Change-Id: I0c5109d00c67054fe15b3fb98cf8cbca69123d8b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
|
|
|
|
|
| |
Change-Id: I2d1d75d150e4072e649f77e6e46c9a3256f3194b
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Ide74482b133dd1fec40a725d9aa81bd749385f37
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|
|
|
|
|
|
| |
It's, well, deprecated...
Change-Id: Ie9d7e80345a8d9404f702dd877b3e940a1a49d93
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|
|
|
|
|
| |
Task-number: QTCREATORBUG-9535
Change-Id: Ifd94f674214314b3694be74cca297ddab873cd8c
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|
|
|
|
|
| |
Task-number: QTCREATORBUG-14135
Change-Id: I94e850f729bd3dbf4212960c7a980a1f118030b4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
|
|
|
|
|
|
|
|
| |
Make the expected output copyable to the test.
Change-Id: I4fc61682f14d0de054a11d2ffa4a0f36ede0e500
Reviewed-by: Francois Ferrand <thetypz@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Id97ca27fa909979573efca12dc0cd14b28eacd17
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Iaa0e7550abf6be77601b1852652bb3d0731d0323
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added support for resolving case:
enum E
{
val1,
val2 = val1, // val2-4 are not resolved
val3,
val4
};
Task-number: QTCREATORBUG-13932
Change-Id: I122c5eb0b0397d6c02bc3db0a5c1ea1c28c5c6e7
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Extends lexer so digit or string can be followed by underscore '_' and
alphanumeric defining literal.
2. Extends parser so it accepts operator"" _abc(...) user-defined literal
definition.
3. Adds Token::Flags.userDefinedLiteral bool flag field representing if token
carries user-defined literal.
4. Adds C++11 auto tests case with: 12_km, 0.5_Pa, 'c'_X, "abd"_L, u"xyz"_M
5. All optional suffix scanning methods now return boolean if the suffix was
found.
6. Adds C++ Lexer tests for user-defined literals with C++11 feature enabled.
This change however does not make QtCreator understand user-defined literal
semantics, e.g. properly resolve type when applying custom literal operator.
Change-Id: I30e62f025ec9fb11c39261985ea4d772b1a80949
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/plugins/debugger/watchhandler.cpp
src/plugins/projectexplorer/kitmodel.cpp
src/plugins/qbsprojectmanager/qbsprojectmanager.cpp
src/shared/qbs
Change-Id: I6a68090993a264e93ac7850858cc24ba6bdb5602
|
| |
| |
| |
| |
| |
| | |
Change-Id: I5e86da3a36514545834f554470b147ad8be43344
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In the struct _Wrap_alloc (see test code) the rebind struct has
_Wrap_alloc as parent. However, within rebind the typedef of type
_Wrap_alloc has rebind as parent.
We will refactor that in master by introducing a "parent iterator"
class checking for cycles, so the client code looks less noisy.
Task-number: QTCREATORBUG-13703
Change-Id: I7b6cf819ea869139d2403e15ba085d8fba19763e
Reviewed-by: Cristian Adam <cristian.adam@gmail.com>
Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
|