The infinite recursion could happen if an inheritance hierarchy has a
cycle in it, or if a class aggregates itself (both of which are invalid).
Change-Id: I99598a57982dca51acab5a1297392f04d9008aec
There were issues with how the Core Build calculated whether reindexing
was required due to compiler settings changes. Also if a source file
was built more than once in a CMake build, it ended up always
triggering a reindexing since the second instance looked like a
settings change. We now only use the last compile command for a file.
Change-Id: Icf2922e527ae20e0c3b0dae898d981d334013109
This ability was only needed by two tests, and stringifying template
arguments is prone to infinite recursion problems.
Change-Id: I485fa09358c0569b48b6847994aed720ba969b1f
This prevents names getting incorrectly stuck with ProblemBindings
created at a time when the AST wasn't fully ambiguity-resolved yet.
Change-Id: Ibca4a774ee26c393bf2b6decb535b82a2329caad
Rather than try/catch/fail just let exception cascade so that the full
stacktrace is available in the test results.
The braces have been left in place for scoping and to minimize changes.
Change-Id: I5407829ea964f828e3f996794489a7b884de25fb
You now have more precise options for the Source not
Found Editor.
Change-Id: I7391e50c0a9bf7fc712a45d1946e5a24e91c4991
Signed-off-by: Pierre Sachot <sachot.pierre@laposte.net>
Signed-off-by: Yannick Mayeur <yannick.mayeur@gmail.com>
Also-by: Pierre Sachot <sachot.pierre@laposte.net>
Also-by: Yannick Mayeur <yannick.mayeur@gmail.com>
There are cases where we consider some variables as complex when they
are not. In particular, if a pointer is declared using a typedef, is
will be considered complex with the current code. This is because it
has a child (the pointed value), but CDT doesn't know it's a pointer.
One of the consequence is that we assume the value is not modifiable.
Therefore, we won't update its value when it changes, and we won't let
the user edit it.
Initially I thought it would be safe to assume that variables with two
or more children are complex, but pointers to structures have as many
children as the structure has fields. Therefore, a pointer to a
structure, declared as a typedef, will still be wrongfully considered as
complex. Since there's no easy way to know for sure whether a variable
is complex, just assume everything is simple.
I added a test to verify that the value of a pointer declared using a
typedef will update correctly in CDT as it changes in the program.
There are two distinct scenarios, pointers that are variables and
pointers that are fields of structures. Instead of adding content to
testUpdateOfPointer, I decided to make a similar test method,
testUpdateOfPointerTypedef. The original test method was getting too
long and was difficult to follow. I think it's good to keep them short
and focused.
Another test verifies that the same kind of pointer can properly be
written/modified by the user.
Change-Id: If43b3b6e49cd4a20ea929c2a096745a32de14cd0
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
The Package Explorer's content provider is not extensible the same way
as the CommonNavigator so it does not contain CElement in its tree;
instead it contains IResources (IFile, etc) and Java specific elements.
However, the file language mapping property page is set to be displayed
on selections that adapt to translation units.
So this change allows IFiles to be adapted to ITranslationUnits
therefore the property page can still be shown from the Package Explorer.
Change-Id: Ia52a62c2d8800e2a4f0404bc00e346decbacaa3b
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
This check already existed for modifying breakpoints, but didn't exist
for creating new breakpoints or installing initial breakpoints.
Change-Id: I5ff5ce0b3ac603ccffa49bd98d60f7202505a7bd
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
This affects the synchronizer as it now should defer to the manager
to get the filter extension, instead of trying to load it directly.
Change-Id: I0e646f115ba089453c56f2cc356a4e0a99a1a3b7
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
I added cmake arguments in the launch configuration for CMake
projects but didn't add it to the command line.
Also indexing wasn't working on my Mac. llvm-cc overrode the standard
local cc. Added the local compile commands if the toolchain is local.
Change-Id: I914c52dd42fbf84b87cd0e8c7504f024c2449a82
We added a checkbox to disable the source not found editor and an option
in preferences for adding it again.
Change-Id: Icc7a21cd14ea81e53517d0b3c420de0927335ed4
Also-by: Yannick Mayeur <yannick.mayeur@gmail.com>
Signed-off-by: Pierre Sachot <sachot.pierre@laposte.net>
Reformatted file, added missing braces and removed "non-Javadoc" comments.
This file had suffered particularly badly from mixed spaces and tabs
in a single file, with some lines having both on the same line.
Change-Id: I0bff49effa0225cb6409547d8daa9dbf9c22e1b9
Manually testing this code shows it works, but this test fails
>50% of the time on Hudson causing significant numbers of
UNSTABLE builds.
Change-Id: Ie23e97e477d9b154ff33b38374bd257412241889
Those features have the exact same id and groupid than a plugin
which throws off SonarQube with:
"Two modules have the same id: 'org.eclipse.cdt:org.eclipse.cdt.util'.
Each module must have a unique id."
In the pom.xml, we can specify a different groupid which resolves the
problem. Alternatively, the feature id could have been changed but that
would break upgrades.
Change-Id: Ib2912ad854a3af431b96f89a6ead1bcb6d06ba60
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
The following standard headers were missing from the file associations:
- cuchar
- cstdalign
- scoped_allocator
- shared_mutex
Additionally, cinttypes is no longer (since C++11) a GCC extension
Change-Id: I1545257d7d934c970de4f2f45f4e15499cec3fd9
Signed-off-by: Felix Morgner <fmorgner@hsr.ch>
- add new FixitErrorParser that extends RegexErrorParser and is
used to replace the error parser for GNUCErrorParser
- add new FixManager class to bind a fixit message with its
problem marker
- modify ProblemMarkerFilterManager to register the last
accepted ProblemMarkerInfo for a particular resource so
the FixitErrorParser can find the last error marker for
the file that precedes the fixit message
- FixitErrorParser looks for fix-it messages and binds them
via FixitManager to the last error marker for the file
- add new Fixit class to contain the details of a gcc fix-it
- add new QuickFixForFixit which applies the gcc fix-it for the
file
- add new (.*) regex in codan.ui.checkers patterns that will
trigger before any other error and will look for the
fix-it message format
- change cdt.core to expose cdt.internal.errorparsers to
codan.checkers.ui
- change codan.core to expose codan.internal.core.model to
codan.checkers.ui
- fix CDocumentProvider.setOverlay method to not overlay
a CMarkerAnnotation that has a quick fix
- when deleting all C problem markers, also make a call
to FixManager.deleteAllMarkers() so markers aren't
left referenced
Change-Id: Ibf8ff7d8addb1bf092dc4ef35de0d92de0309589
The break inserter test was running all display events for 200ms after
each simulated keystroke, but all sideeffects were happening synchronously
or being placed on the event queue synchronously. So speed-up is achieved
by running event queue until empty instead of effectively sleeping for
200ms
Change-Id: Icffd4d5526176e596cf8ce3ac716a4ae88d51159
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
Remove massage timeouts for places waiting for no events
This is a partial revert of c19640498d
which was part of Bug 499784.
Change-Id: Ib66ed5eaf45977d4ffae77358deaf1f593e005c6
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
The test was much too conservative on how long it waited for an event
to arrive. On my machine the time was 10 ms, so I set a baseline time
to wait of 100 ms allowing time for additional event to arrive.
Change-Id: Ic435d360e8781936682c19b838aeec13fa3d60bd