| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Note that we only make sure not to trip over valid code; we make no
effort to check whether default/delete is actually allowed at this
type of declaration.
Fixes: QTCREATORBUG-28102
Change-Id: Ic693319b9dfaf8652cf4cae9cd907a6e258ad773
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Task-number: QTCREATORBUG-16774
Change-Id: I3de3ac65810213e21c9a3bafef2474d252e191f7
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Change-Id: Ifa81a481bf92b5b71495a105ae292f3e9895f704
Task-number: QTCREATORBUG-9279
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
|
|
|
| |
The "_type" wasn't reset.
Task-number: QTCREATORBUG-12521
Change-Id: I0d38cb38e270260065313d1235d42f2689385850
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The introduction of C99 designators led to parsing problems with lambdas
that were passed in as a function arguments.
Fixed by prefering to parse without designators first. This will be
cleaner/clearer once the appropriate "LanguageFeatures" from the Project
Parts will be passed in.
Change-Id: Ia9cb7c4a4c9345e729cf2044e1e5411fe63e33ec
Reviewed-by: Wang Hoi <wanghoi@126.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
|
|
|
|
| |
The parser considers '{' an operator and thus thought
"template-id {" couldn't possibly be valid. This patch adds
'{' as an exception to the rule.
Change-Id: I40730fcdc5cade48566b4c8b6fde390f455bbdba
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
|
|
| |
In particular "auto foo() -> typename Foo<T>::X;" didn't parse.
Change-Id: I7665c9b387e222e4107f053a529d502813ebf617
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
|
|
| |
Task-number: QTCREATORBUG-7679
Change-Id: I794f52b2bcfb6c78ceef86ec53b6ed32b3d53d9f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
|
|
| |
Task-number: QTCREATORBUG-7919
Change-Id: I12307c3fb6c20424c8b5aaf564a031924c755d25
Reviewed-by: hjk <qthjk@ovi.com>
|
|
|
|
|
| |
Change-Id: I7f843fa96e33671ecb135b9db6f68d9f2cbf2fac
Reviewed-by: hjk <qthjk@ovi.com>
|
|
|
|
|
|
|
|
|
| |
This time in the 'new' expression. Changed it to make
new C(1, abc...) and new C{1, abc}
work.
Change-Id: I7232798fd083b653ee04ef9ede386d6536133e16
Reviewed-by: hjk <qthjk@ovi.com>
|
|
|
|
|
|
|
| |
As a postfix expression.
Change-Id: I65cae0571080a9fb699af61c661328ef06f97890
Reviewed-by: hjk <qthjk@ovi.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This will fix a couple more places where brace-init-lists and
pack expansions are allowed but are not currently accepted by
the parser. For example:
foo(abc...);
now parses correctly.
Change-Id: I93710cef35154fea8437329f3174e4a2d56637b8
Reviewed-by: hjk <qthjk@ovi.com>
|
|
|
|
|
| |
Change-Id: Iab707d855f98982697365f9a4cd7832877e64d17
Reviewed-by: hjk <qthjk@ovi.com>
|
|
|
|
|
| |
Change-Id: Ic99ca897e7a3b9c82cf8c5093a90bf9c88dbb0ed
Reviewed-by: hjk <qthjk@ovi.com>
|
|
|
|
|
|
|
|
| |
For declarations like:
enum struct Foo : long int;
Change-Id: Id813efdbc31c8d70a4b40bb0101dc33a8dd2556a
Reviewed-by: hjk <qthjk@ovi.com>
|
|
|
|
|
|
|
|
| |
The parser no longer fails declarations like:
using Foo = std::vector<int>::iterator;
Change-Id: Ib3a552ebbe0147fa138db6448a52cdba8f9b9207
Reviewed-by: hjk <qthjk@ovi.com>
|
|
|
|
|
|
|
|
| |
Also drop the unused 'initializer' member from
RangeBasedForStatementAST.
Change-Id: I078ebbc85cafa643af4bfe62d698bf7de71360e4
Reviewed-by: hjk <qthjk@ovi.com>
|
|
|
|
|
| |
Change-Id: Id3fb30b9a16ea724bab0d5b05e8cbddb0064e6eb
Reviewed-by: hjk <qthjk@ovi.com>
|
|
|
|
|
|
|
|
|
|
| |
Means
void foo() const &; void bar() &&;
and the corresponding pointer-to-member declarators
now parse.
Change-Id: Idbf295bd4f51cd5d9e38efcac1940b8cc2e32fce
Reviewed-by: hjk <qthjk@ovi.com>
|
|
|
|
|
|
|
|
|
| |
So
class C { C() : _x{12}, _y({12}) {} };
now parses correctly.
Change-Id: I4281dcb0541a86b550e74630cad6ae0a59fef1b4
Reviewed-by: hjk <qthjk@ovi.com>
|
|
|
|
|
|
|
| |
These are converted to IdExpr(SimpleName(token)) initializers.
Change-Id: I1e85c4b261ca028dc75ffe6c00e1090630c2957c
Reviewed-by: hjk <qthjk@ovi.com>
|
|
|
|
|
|
|
| |
Like return {1, 2};
Change-Id: I7442da1866b0106bc075783653c95c16ebedb51a
Reviewed-by: hjk <qthjk@ovi.com>
|
|
|
|
|
|
|
|
|
| |
Like:
var += {1, 2};
in a function context.
Change-Id: I3936c97c4fcb6b3dcac2979e0508d422d47fddfc
Reviewed-by: hjk <qthjk@ovi.com>
|
|
|
|
|
|
|
|
|
|
| |
This allows them to be used in declarator initializers that expect
an expression list in parentheses. Like
T v({1, 2}, 3, 4);
Change-Id: I62e1ffd355ca88f7acbb8708c9b40c8310489ca3
Reviewed-by: hjk <qthjk@ovi.com>
|
|
|
|
|
|
|
| |
And add a basic test.
Change-Id: I3b8b87d51a9da154758d17380bba5922795f675c
Reviewed-by: hjk <qthjk@ovi.com>
|
|
|
|
|
|
|
| |
Add some checks for C++11 flag as well.
Change-Id: Ic5ee81d72bc88a22e71b324ef01014791b833604
Reviewed-by: hjk <qthjk@ovi.com>
|
|
|
|
|
| |
Change-Id: Ifa0bc37916d3ac3a523580bec15a6685709e7810
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
|
|
Add the declaring `inline' namespace to the `using list' of its
enclosing namespace symbol. This should be enough to ensure
the correct visibility of the symbols declarated in the inlined
namespace.
Change-Id: Id4de74577c498fe439a49709a306ef0deb145988
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
|