This fixes openQmakeProject(). There's still more
to do (e.g. selecting Release/Debug) what will be
done in later patch(es).
Change-Id: I34ebf793c89b2d2ddf1f97c7eed6c6eb6c7f5bcb
Reviewed-by: Robert Löhning <robert.loehning@nokia.com>
The new stuff is mostly C++11 features (closures etc.).
Also fix a number of bugs uncovered along the way.
All tests succeed now, including the examples
from the specification.
Change-Id: I9b224b0dd82ad8f5b17d5f5d1809d1dea1a7a803
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
if this is enabled, the evaluator implements all functionality
necessary for qmake. without it, functionality which is unnecessary or
outright dangerous in qt creator or lupdate context is omitted.
Change-Id: I233cfa6daf2e4451f9f1d3d14711be2a7cfe4293
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
this is clearer and not necessarily more code.
Change-Id: Ic698a8076658ae986d0dbdeebb1f4760dd806e35
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
not setting it outside the main project processing, as it's even less
likely to be needed there.
Change-Id: Ia7afe3a53bf0977d739bf23d7cd79e3a2aee8867
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
- Fix assertion macro.
- Make parse tree smaller by getting rid of nodes that serve no purpose.
- Add all examples from the ABI spec to the auto test.
Change-Id: Id63d8330e6380bfb7d56acd1d445f7b70a1f6e70
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Now all the parsing logic as well as the stringification is in the tree
nodes.
Change-Id: Ie8222729c14c0102d94045026fc61a75cd31cc63
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
So far, we converted the mangled to the demangled representation on the
fly while parsing. Because some demangled strings look different
depending on higher-level context, awkward string manipulations were
then necessary at some later point.
The new solution is much more easily maintainable, creating a tree with
a node for every rule in the grammar first and converting the complete
tree to the demangled string later.
Change-Id: I59088df259611d7cd78af47b81b6a21d628a787f
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
follow suit with qmake ...
once we move currently builtin functionality to these feature files,
things would break with qt4 (which does not have them). consequently,
we provide our own fallback versions of them.
Change-Id: Ie318f3419d78214472835c41ec1388977f2e9269
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
this is QMakeEvaluatorHandler, but derived from QMakeParserHandler.
the idea is that the parser can be used stand-alone, while the evaluator
needs the parser as well.
we will need it in QMakeGlobals as well, so put it there, as that is the
most central place.
Change-Id: I6ee46c0e4b2e044bf3bfc6e4235b53525ddfc875
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
the functions are still part of the same class, though.
Change-Id: I58a69d334ac9d1d53b5395d0b655895ffe18c7be
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
more natural name. the ProFileEvaluator class itself is somewhat more
high-level, so it will remain named as it is. i'll move around the code
at a later point.
Change-Id: I03fa844d0109e281f3602b4781ac11c6f2954aa4
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
- Correctly decode conversion operators and add test cases.
- Adapt to change in the specification regarding template parameter
packs.
- Make #ifdef'ed code compile.
Change-Id: Ifea1408d08172f9aeccd5e64a1e4818cd632a0d0
Reviewed-by: hjk <qthjk@ovi.com>
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>
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>
Additionally changed waiting for TargetSelector
from 20s to only 5s.
Change-Id: I2e342faa6f87b86335bb01f28832ad9c01a27ffb
Reviewed-by: Robert Löhning <robert.loehning@nokia.com>
* add Desktop as available target in __chooseTargets__()
* do shadow builds for Desktop targets in openQmakeProject()
This patch makes https://codereview.qt-project.org/#change,28038
pass for me on Linux as well.
Change-Id: I3a4395a401198756e6a7d6a38c0b024167088dc3
Reviewed-by: Robert Löhning <robert.loehning@nokia.com>
Make it just like SshRemoteProcess (and QProcess). The current
implementation annoyingly forces client code to establish additional
signal/slot connections, even if they only want to evaluate the output
at the end.
Change-Id: Id8c30dd156574d7d26d848d8e0705856a16d3747
Reviewed-by: hjk <qthjk@ovi.com>
(We cannot use QProcess::ExitStatus itself, because it does not contain
FailedToStart.)
Change-Id: I83ed6de621e2693e539562cd8e56ef478fa4fcb9
Reviewed-by: hjk <qthjk@ovi.com>
Make sure the environment line is consistent during preprocessor
directives and identifier handling so clients can rely on consistent
information. Particularly important for macro usages.
New tests also added.
Change-Id: I962a39a86cd17b8d945d2959c2c95e2d258ea3e6
Reviewed-by: hjk <qthjk@ovi.com>