Summary of most relevant items:
- Preprocessor output format change. No more gen true/false. Instead
a more intuitive and natural expansion (like from a real compiler) is
performed directly corresponding to the macro invocation. Notice that
information about the generated tokens is not lost, because it's now
embedded in the expansion section header (in terms of lines and columns
as explained in the code). In addition the location on where the macro
expansion happens is also documented for future use.
- Fix line control directives and associated token line numbers.
This was not detected in tests cases because some of them were
actually wrong: Within expansions the line information was being
considered as originally computed in the macro definition, while
the desired and expected for Creator's reporting mechanism (just
like regular compilers) is the line from the expanded version
of the tokens.
- Do not allow for eager expansion. This was previously being done
inside define directives. However, it's not allowed and might
lead to incorrect results, since the argument substitution should
only happen upon the macro invocation (and following nested ones).
At least GCC and clang are consistent with that. See test case
tst_Preprocessor:dont_eagerly_expand for a detailed explanation.
- Revive the 'expanded' token flag. This is used to mark every token
that originates from a macro expansion. Notice, however, that
expanded tokens are not necessarily generated tokens (although
every generated token is a expanded token). Expanded tokens that
are not generated are those which are still considered by our
code model features, since they are visible on the editor. The
translation unit is smart enough to calculate line/column position
for such tokens based on the information from the expansion section
header.
- How expansions are tracked has also changed. Now, we simply add
two surrounding marker tokens to each "top-level" expansion
sequence. There is an enumeration that control expansion states.
Also, no "previous" token is kept around.
- Preprocessor client methods suffered a change in signature so
they now receive the line number of the action in question as
a paramater. Previously such line could be retrieved by the client
implementation by accessing the environment line. However, this
is not reliable because we try to avoid synchronization of the
output/environment lines in order to avoid unnecessary output,
while expanding macros or handling preprocessor directives.
- Although macros are not expanded during define directives (as
mentioned above) the preprocessor client is now "notified"
when it sees a macro. This is to allow usage tracking.
- Other small stuff.
This is all in one patch because the fixes are a consequence
of the change in preprocessing control.
Change-Id: I8f4c6e6366f37756ec65d0a93b79f72a3ac4ed50
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
I had fixed this in e638dc8232 but the
changes were reversed in 2431456216.
C++11 requires a space for concatenation of string literals.
Change-Id: Iba34319953c003469ec89d2c99973bd07a124390
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Splitter between 'description' section and 'files' section. This makes it easier
to work with smaller screens.
Change-Id: Ie1d8c7a671faba270e6906504b3af56ff8c85e28
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
When using the file selections locators (OpenDocumentsFilter, FileSystemFilter,
and those inherited from BaseFileFilter), allow specifying the line where to open
the file: like 'file.cpp:654'.
This syntax works for wildcards/incomplete expression as well: toto:423 will match
'toto', and open resulting file at line 423.
Also, fix line extraction in editormanager, to support a single semicolon (without
number) as well as a line explicitely set to 0.
Change-Id: I80e13b59aa9c972f33963cfee81ec04f277fe526
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Update factories for this to work as well as the settingsaccessor.
Change-Id: If7cb1db3fa0c50441aa5bd1c2d2659c6a0177743
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
by removing legacy upgrade code that should no longer be used anyway.
Remove the count of versions while at it.
Change-Id: I014a8934581761d3219fe41dc7888903e7d6a85c
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
... of a stored tool chain. This is necessary to upgrade toolchains
to 2.6 file format smoothly.
Change-Id: I401a18924360fdf2d2797bebd9a0dcc059e80518
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Report teh effective, default and set mkspec separately to improve
the importing and the UI.
Change-Id: I6087950cd961829d7fcf60b3f6de317a02444631
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Improve error reporting when loading a device failed.
Change-Id: I6fdb8b77db10d03651d087aff9417a31ecdb0fdb
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Simplify the code a bit, now that Core::Id uses utf8 conversion from/to
QString. Also make sure to not trigger warnings on invalid data.
Change-Id: Iccc523161fbcb89148a76684353e96ac875c24c7
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Introduce Profiles to store sets of values that describe a system/device.
These profiles are held by a target, getting rid of much of the information
stored in the Build-/Run-/DeployConfigurations, greatly simplifying those.
This is a squash of the wip/profile branch which has been on gerrit for a
while, rebased to current master.
Change-Id: I25956c8dd4d1962b2134bfaa8a8076ae3909460f
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Ignore the directory used by the SDK to store Qt versions, etc.
Change-Id: Ieb4021ac5fdf607996256aed55437b552c9c1794
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This reverts commit 44d8e7bef7.
The original test case was actually right. I guess I was mislead
by the recently added preprocessor tests, which are the ones
that should be corrected (together with the preprocessor, which
seems to have issues with # lineno generation).
Conflicts:
tests/auto/cplusplus/preprocessor/tst_preprocessor.cpp
Change-Id: I47f82ed23a37086d0d81c4b3ea2cac48fb753451
Reviewed-by: hjk <qthjk@ovi.com>
Reviewed-by: Francois Ferrand <thetypz@gmail.com>
Do not expand function-like macros at all when there's a mismatch
in the parameter/argument count.
The report below raises the issue but its expected result is not
correct. This would be the more appropriate fix.
Task-number: QTCREATORBUG-7225
Change-Id: Ide8580faa7b724d3e8b396ec1f899cc5ca7f9e7e
Reviewed-by: hjk <qthjk@ovi.com>
Commit fa66a540 fixed string literal and macro concatenation
some time ago, but while it changed "literal1"M1"literal2" to
"literal1" M1 "literal2" it didn't touch M"literal". This patch
changes this to M "literal" for consistency.
This patch is the remnant of a cherry-pick of a C++11 compilation
fix equivalent to fa66a540 from KDAB's branch of QtC 2.4.0.
Change-Id: I87644e888a7e74b18d4b1ca10786cdc3fa798453
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Reviewed-by: hjk <qthjk@ovi.com>
Most derived classes used essentially identical 'return 0;'
implementations. Use a base class implementation doing that instead.
Change-Id: I99727ac2230a5d9f168b4b0eb5927f8efff44e64
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
We used Q_ASSERT to verify packet validity even for incoming packets,
which means a malicious host could crash QtCreator by sending invalid
data.
Change-Id: Ie2b674d40273d987d91387f41748fbe085c63ed8
Reviewed-by: hjk <qthjk@ovi.com>