Commit Graph

267 Commits

Author SHA1 Message Date
Christian Kamm
107544bd7b C++: Set endOffset of Function symbols even if skipping bodies.
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>
2011-09-08 10:05:22 +02:00
Christian Kamm
c074b18f8d C++: Improve Literal::hashCode.
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>
2011-09-07 09:32:24 +02:00
Erik Verbruggen
af48de18e7 C++: fixed potential crash for out of bounds access of token_names.
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>
2011-09-05 15:32:09 +02:00
Christian Kamm
cf96bc10d2 Remove some dead stores pointed out by clang.
Change-Id: I919a2e98474fec42861391d11d2ba1225eb2adf9
Reviewed-on: http://codereview.qt.nokia.com/4083
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-09-02 10:37:31 +02:00
Roberto Raggi
c264f5b23c Regenerate the default AST visitors.
Change-Id: I429c9d454a1b896abf642225ef7b506481fac708
Reviewed-on: http://codereview.qt.nokia.com/3867
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
2011-08-30 11:13:00 +02:00
Christian Kamm
142bce94fb C++: Store comment tokens in the translation unit.
Change-Id: I904123bdbbd675e9f018236c1fed13528d83f87f
Reviewed-on: http://codereview.qt.nokia.com/3481
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2011-08-25 13:20:19 +02:00
Eike Ziller
bf8cb5d4fc Merge remote-tracking branch 'origin/2.3'
Conflicts:
	qtcreator.pri

Change-Id: Iaca68084799ae9aec257742c395609d6e8aa72cd
2011-08-16 10:21:55 +02:00
Leandro Melo
cea012a152 C++: Fix BaseSpecifierAST::firstToken return
Change-Id: I105d94f543d22319571320cd88f791278aac3239
Reviewed-on: http://codereview.qt.nokia.com/2734
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2011-08-15 16:39:38 +02:00
Eike Ziller
99ba300ae3 Merge remote-tracking branch 'origin/2.3'
Conflicts:
	qtcreator.pri
	src/libs/libs.pro
	src/plugins/debugger/watchwindow.cpp
	src/plugins/remotelinux/maemopackagecreationstep.h

Change-Id: Ic67c46256d0060ee9845b92ef82539f6f8fbe639
2011-08-10 16:03:57 +02:00
Christian Kamm
01bb7443fd C++: Fix off-by-one in scopeAt.
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>
2011-08-10 14:37:17 +02:00
Leandro Melo
fb550c4ff1 C++: Fix crash when typing illegal class names
Such as class ~A {} or class operator+ {}.

Done by Roberto Raggi

Change-Id: I4fdad6d27aaa997e651f2d08de36fe675fc78814
Reviewed-on: http://codereview.qt.nokia.com/2778
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2011-08-09 14:11:28 +02:00
Leandro Melo
89ac110ab0 C++: Relax parsing for templateid in some cases
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>
2011-07-15 16:31:03 +02:00
Erik Verbruggen
b83932708c Fixed invalid parsing of boolean expression "x < y && z > this".
Task-number: QTCREATORBUG-4362
Reviewed-by: Roberto Raggi
2011-05-17 17:05:52 +02:00
Roberto Raggi
9608af7ad2 Added support to C++ symbols rewriting.
This should simplify full C++ template instantiations.

Reviewed-by: Christian Kamm
2011-05-17 11:45:47 +02:00
Roberto Raggi
cae8d4169b Fix the AST code generator 2011-05-16 12:48:05 +02:00
Oswald Buddenhagen
b342ad8cf4 remove nokia copyrights from roberto's code
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
2011-05-16 11:05:30 +02:00
Oswald Buddenhagen
67704b8b41 move src/shared/cplusplus/ -> src/libs/3rdparty/cplusplus/
Approved-by: legal
2011-05-16 11:05:30 +02:00