Actually this behavior was already in the Lexer for regular string
literals (although erroneously not for wide ones) and was lost
in the recent commit 23c637c4f6.
Change-Id: I36609038ce22dc6389e9da5b078f7bf7f6c031be
Reviewed-by: hjk <qthjk@ovi.com>
Those are the types char16_t and char32_t along with the new
char/string literals u'', U'', u"", u8"", and U"".
This is particularly important for the use of QStringLiteral
since in some platforms it relies on expansion such as above.
Note: The string literals quickfixes still need some tunning.
Task-number: QTCREATORBUG-7449
Change-Id: Iebcfea15677dc8e0ebb6143def89a5477e1be7d4
Reviewed-by: hjk <qthjk@ovi.com>
It will be particularly handy when introducing the new C++11
string/char literals: U"abc", u"abc", u8"abc", U'a', u'a'.
Change-Id: Ic250f5a7b999da322debb24fc0171aaef333f356
Reviewed-by: hjk <qthjk@ovi.com>
Now Qt Creator does not warn about lambda declaration with not empty
parameters list.
Task-number: QTCREATORBUG-6243
Change-Id: I07121a80fbca98c36820d1d8bb1be6e82ab96b12
Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
Now we can parse:
auto foo()->int;
without getting semantic errors.
Change-Id: Id65c1198c20b2b0c7e8e4eee8ad176d0d66fc0d7
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Getting the #include directives ready for Qt5. This includes the
new-project wizards.
Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
The change brokes the Lexer.
This reverts commit e46a5579d3.
Change-Id: I3363c6eff74b53a7f2d9f417941cde07aaa92619
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
The whitespaces are now highlighted with the same backgroundcolor as the characters.
Also added a test for the Lexer.
Task-number: QTCREATORBUG-5802
Change-Id: Ic1bcd8cfe30d6b8a0281b7963eaab310f972b9d2
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>
Actually, those should have gone in the previous corresponding
commits which introduced support for the keywords.
Change-Id: Ie95944899c426a2c2b03e60d1ad557e00bc3a82a
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Thanks to Clang's parser_overflow.cpp which has >16000 nested compound
statements to check exactly the same.
Change-Id: I2b604f8ceb01115d7fe950994e0677a081e99481
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
Fixes insert-definition-from-declaration when the source file was not
yet opened in an editor.
Change-Id: I4263113390ae4fbe9d4641104b5cb43373ddc5a4
Reviewed-on: http://codereview.qt-project.org/4394
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
This can have a dramatic impact on performance when a file contains lots
of unique literals.
Change-Id: I5309b28f704d7f53e164dc8084ae08354c09354b
Reviewed-on: http://codereview.qt.nokia.com/4312
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Cause: Q_PRIVATE_PROPERTY didn't have an entry in token_names, so if
Token::spell or Token::name was called on a T_Q_GADGET, an out-of-bounds
access would occur.
Change-Id: I1ec7b91a5d3def5508e21ad4f1863a52cb4ed540
Reviewed-on: http://codereview.qt.nokia.com/4207
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
The only Scope that set the end offset to *before* the last token
was ObjCClassDeclaration.
Change-Id: Icbdb5bcdd72d96087ac586ad51510fed74a633eb
Reviewed-on: http://codereview.qt.nokia.com/2820
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
The correct parsing for certain templateids would require name
lookup. In order to avoid erroneous syntax errors detection (like
the one below ) we block the notification for such cases.
bool r = a < b ? c > d : false;
Task-number: QTCREATORBUG-5122
Change-Id: I9eb9ee89cd21bec3ed924982957f50f9346f90be
Reviewed-on: http://codereview.qt.nokia.com/1704
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
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