This adds a new scalability preference that aborts parsing when too many
Tokens are created for a single translation unit. This is a heuristic
that fairly close predicts the files that will be too complex for the
indexer to handle.
The token counter is disabled by default.
When it is enabled, the default token limit is 25,000,000. This value
was determined by counting the number of Tokens produced for each
translation unit in the boost-1.55.0 sources:
sqlite> select * from counts where count > 10000000;
count location
-----------------------------------------------------------------
100000001 libs/local_function/test/all_decl.cpp
100000001 libs/local_function/test/all_decl_seq.cpp
100000001 libs/local_function/test/all_decl_seq_nova.cpp
100000001 libs/preprocessor/doc/examples/array_arithmetic.c
99808587 libs/function_types/build/preprocess_arity_loops.cpp
62380381 libs/preprocessor/doc/examples/delay.c
58096841 libs/serialization/performance/xml/string256_test.cpp
58096828 libs/serialization/performance/xml/int256_test.cpp
52898416 libs/mpi/src/python/collectives.cpp
52573708 boost/spirit/home/support/char_encoding/ \
unicode/create_tables.cpp
21315014 libs/utility/binary_test.cpp
18799536 libs/math/test/test_rational_instances/ \
test_rational_double1.cpp
17758615 libs/mpl/test/string.cpp
13100401 libs/container/bench/bench_set.cpp
11976021 libs/local_function/example/const_block.cpp
11381198 libs/math/test/test_tr1.cpp
10432186 libs/parameter/test/preprocessor.cpp
This value means that the indexer will process all files in boost
without running out of memory on a 1Gb heap.
Change-Id: Ia9fc73dfb38454cc8735f537e3ac6e661864fb4f
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/22386
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
Tested-by: Doug Schaefer <dschaefer@qnx.com>
units are now automatically taken into consideration when rewriting.
Change-Id: If535ab6cdd1ec293a0d95a6f726d848f6348f0ed
Signed-off-by: Lukas Felber <l.felber@gmx.ch>
Reviewed-on: https://git.eclipse.org/r/21761
Reviewed-by: Thomas Corbat <tcorbat@hsr.ch>
IP-Clean: Thomas Corbat <tcorbat@hsr.ch>
Tested-by: Thomas Corbat <tcorbat@hsr.ch>
Change-Id: I31579f0eb33f0797dd09dab0c2de9de88967fd4d
Signed-off-by: Markus Schorn <markus.schorn@windriver.com>
Reviewed-on: https://git.eclipse.org/r/22362
Reviewed-by: Andrew Gvozdev <angvoz.dev@gmail.com>
IP-Clean: Andrew Gvozdev <angvoz.dev@gmail.com>
Tested-by: Andrew Gvozdev <angvoz.dev@gmail.com>
Change-Id: Idce28724b7b7b1bc8c43528036b2697386ec76b7
Signed-off-by: Marco Trudel <marco@mtsystems.ch>
Reviewed-on: https://git.eclipse.org/r/21659
Reviewed-by: Thomas Corbat <tcorbat@hsr.ch>
IP-Clean: Thomas Corbat <tcorbat@hsr.ch>
Tested-by: Thomas Corbat <tcorbat@hsr.ch>
The Open Declaration (F3), etc. actions use code in the ASTProvider. If
the provider is not able to get an AST then the actions are disabled.
The implementation of the ASTProvider has an "instanceof CEditor" check
the result being that ASTProvider can only be used when the editor is a
CEditor.
This breaks our use case where we have a CEditor embedded as a tab in a
multi-pane editor (see org.eclipse.papyrus.infra.core.sasheditor
.editor.AbstractMultiPageSashEditor).
This patch modifies the ASTProvider to use #getAdapter instead of only
the instanceof check. I've kept the common case (where the editor is a
CEditor) unchanged and added the new code as extra handling.
I've also introduced a public interface, ITranslationUnitProvider, to
avoid forcing clients to adapt to the internal CEditor class. The only
part of CEditor that ASTProvider cares about is the ITranslationUnit.
The existing implementation has an unchecked cast. The new interface
provides the required type directly.
Change-Id: Ie7e68e8909928374fa11fe2b8a857f09d042fb5c
Signed-off-by: Andrew Eidsness <andrewe@jfront.com>
Reviewed-on: https://git.eclipse.org/r/20026
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
When a PDOMName is deleted and that name is the head of an external
references list, the list's head must be changed.
The Qt plugin is the only user of the external reference list. One case
is the link from a SIGNAL or SLOT expansion to the C++ method binding
for the corresponding function. In this case, the problem will appear
when all of the following are true:
1) The file containing the SIGNAL/SLOT expansion is changed and the
index updated
2) The corresponding function is declared in a different file
3) The the function is the first entry in the external references list
When #2 is false, the binding (and the entire list) is removed as part
of updating the file containing the name.
When #3 is false, the list is updated with existing code using the
PDOMName's {next|prev}InBinding pointers.
Change-Id: I1e27c7c2356ca1fb68f57d69c40728289288ed66
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/20972
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
- Fix parsing .debug_line section in version format, part of Dwarf 4.
- Refactor in a separate method reading initial length field to
consistently handle 64-bit dwarf format
Change-Id: I9f32862ed91540c24ce33227eeb384a5d6b141da
Signed-off-by: Teodor Madan <teodor.madan@freescale.com>
Reviewed-on: https://git.eclipse.org/r/20830
The problem is solved by allowing to ignore duplicated markers in case
there is already loaded a plugin that could handle QML files
The ProblemMarkerFilter extension point allows to filter out unneeded
problem markers. For example during building of Qt base project with QML
files tool Qt Linguist could report syntax errors in some qml file.
These errors are presented as "C/C++ Problems" in qml files because they
match format CDT expects for errors. If there is already installed plug-in
that handles QML files it is a wise to ignore such errors because they
are already reported as "QML Problems" with more meaningful descriptions.
Change-Id: I3a0a1b58e9690bed9c2774e4328760c695d54a54
Signed-off-by: Daniel Pesch <dpesch@blackberry.com>
Reviewed-on: https://git.eclipse.org/r/20581
Tested-by: Hudson CI
Reviewed-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>