1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-05 16:56:04 +02:00
Commit graph

25730 commits

Author SHA1 Message Date
Nathan Ridge
20cebd8f6f Bug 525982 - Have TypeOfUnknownMember implement ICPPUnknownBinding
This ensures that name resolution can proceed when a TypeOfUnknownMember
appears on the left hand side of a scope resolution operator.

Change-Id: I2dfc22eb474b8a2f776eda09ce90c91462d7fe5b
2017-10-20 15:32:58 -04:00
John Dallaway
a80f50a725 Bug 334110: Ensure correct SessionType enabled
The DSF-GDB LaunchUtils rely on
ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE for correct
behaviour.

Change-Id: I12ae2dea6918233dc09848b7bbbedc6304294d1a
Signed-off-by: John Dallaway <john@dallaway.org.uk>
2017-10-20 13:02:16 +01:00
Doug Schaefer
50756f3f18 Fix bugs with emscripten and scannerInfo.
Change-Id: I54d3691426a48c2a6f71fee4188364e57eea402d
2017-10-19 12:52:38 -04:00
Alex Schuilenburg
8a45638df7 Bug 526254: Increase choice of speeds to match that of modern USB Serial
FTDI chips.

Increase the choice of serial baud rates for GDB as modern USB Serial
FTDI chips can reliably support serial baud rates higher than the old
RS232 115200 maxiumum.

Change-Id: If60fd006fdb02d94e86ef2e76a26b56da7a3a067
Signed-off-by: Alex Schuilenburg <alexs@ecoscentric.com>
2017-10-19 15:05:16 +01:00
Doug Schaefer
416fed4d94 Make CMake support more resilient.
Add c++ to GCCToolChain since that's what CMake uses by default for
MinGW. Synchronize the scannerInfoCache loading. Double check for
toolchain files at load time for configs that don't have any.

Change-Id: I8071e285ce5deb1448cabd45f394c62fe6a7f2f4
2017-10-18 12:41:40 -04:00
Doug Schaefer
736d7b5955 Make Qt toolchain selection more resilient.
On my Windows box I have lots of GCC toolchains. Make sure it selects
the one from the Qt install. And fix a few NPEs and things around that.

Change-Id: Ifeeca9271b5055ac773b3b77e372a67e07305130
2017-10-17 11:35:03 -04:00
Doug Schaefer
2198597a98 Make no toolchain error handling more generic and reuse with Qt
In particular when Qt Installs are missing. This is a similar scenario
to when toolchains are missing.

Change-Id: Ic78f71436e46c73900a556133c3883df807784d9
2017-10-17 10:38:23 -04:00
Doug Schaefer
6f06e634c4 Fix up handling of Qt build config defaults.
Don't rely on default properties any more. Make sure we can handle
the cases when the properties are null.

Change-Id: I8b359891286118553399e7635d2ea4b7f147892a
2017-10-16 16:09:41 -04:00
Nathan Ridge
48d5342815 Bug 519121 - Avoid building excessively long type strings in ASTTypeUtil
A type can appear as a constituent of another type multiple times.
For example, in 'A<T, T>', 'T' appears as a constituent twice.

When building a type string for 'A<T, T>', this means the type string
of 'T' will appear in the type string of 'A<T, T>' twice.

If such a duplication occurs at every level of a deeply nested type
structure, the length of the type string can become exponential in
the nesting depth.

To avoid this, an optimization is added where, past a length threshold,
type strings refer to constituent types "by reference" rather than
by containing the contents of the constituent type's type string.

Change-Id: Iaea268449a11b598f113a49fc61e9993bb6451da
2017-10-16 13:53:43 -04:00
Doug Schaefer
5f07698911 Fix Default toolchain name in common build tab.
Change-Id: I5e5ff71556780b05f52a28c9ddcf4537fadeb4f6
2017-10-16 13:49:38 -04:00
Nathan Ridge
1054a38b44 Improve tracking of lookup points
ASTCache now sets the AST as the initial lookup point when invoking
an ASTRunnable.

In addition, OpenDeclarationsJob sets the selected node as a more precise
lookup point.

Change-Id: I9b32fccd80bc1b13e6da49a80a896b595784b868
2017-10-16 13:11:26 -04:00
Nathan Ridge
45101e2a64 Bug 512297 - Improve caching of type strings in ASTTypeUtil
Previously, caching of type strings would only be done during indexing.

Now, it is done every time an AST is available, including operations
like semantic highlighting and mark occurrences.

This is important, because without caching, ASTTypeUtil can end up
rebuilding the same type string many times, leading to quadratic
performance on some code patterns.

Change-Id: I260877f820665cbe0939c0c3065514559592e721
2017-10-15 14:32:18 -04:00
Nathan Ridge
e05566a452 Rename EvalParameterPack to EvalPackExpansion
EvalParameterPack was a misleading name. This evaluation represents
a pack expansion expression; the expansion pattern has to contain
one or more parameter packs, but they can be nested inside an
arbitrarily complex expression.

Change-Id: I16d09c349fc6c2b1086e37fd6743f613f02bf5eb
2017-10-15 14:29:35 -04:00
Nathan Ridge
9792a72dae Bug 525438 - Fix file path comparison in AbstractIndexAstChecker.getLineCommentsForLocation()
Using IPath.toPortableString() was causing a forward slash vs.
backward slash mismtach in the path comparison on Windows.

Change-Id: Ib3eb392065fb473f6b6e70cb1dcddceb34ae7240
2017-10-13 13:53:17 -04:00
Doug Schaefer
f5c0094767 Point help docs run at released 4.7 platform.
Change-Id: I77f0674c38db10f6e2e025737210a8086dc9aca8
2017-10-12 16:54:07 -04:00
Doug Schaefer
affb599f24 Allow for changing manually setting toolchains for build configs.
A number of changes that clean up how build configs are done. Now
build settings are stored with the build config instead of in launch
configs. That makes it less launch bar specific. Add build settings
UI to change the toolchain used for a given launch config.

Also changed CMake so it's IToolchain based instead of property which
doesn't work when multiple IToolchains match.

Change-Id: I958d90ede3c1f873ab1530c2b2880808e8f7abef
2017-10-12 16:03:58 -04:00
John Dallaway
f2115d3a56 Bug 525726: Use GDB/MI for temporary breakpoint
Issue a GDB/MI "-break-insert -t -f" command rather
than "tbreak" to avoid raising a "=breakpoint-created"
event which would trigger the breakpoint synchronizer.

Change-Id: I330f3e69fe096cb16791e4d7de7af92b2c9ccd0c
Signed-off-by: John Dallaway <john@dallaway.org.uk>
2017-10-12 08:16:52 -04:00
Michael Woski
4b3aea7e2a bug 525794 - NPE when invoking Open Declaration in "empty space"
Change-Id: I09a8670d113553c9046d829526149f869f4029a4
Signed-off-by: Michael Woski <woskimi@yahoo.de>
2017-10-11 16:51:33 -04:00
Nathan Ridge
a20fb38223 Update cdt.target file to point to '4.7' instead of '4.7milestones',
since the latter has been removed

Change-Id: I247c708a4e8f6948824a4a72a1e14e99fa565b60
2017-10-11 14:15:15 -04:00
John Dallaway
78380bf5f7 Bug 525692: Execute run commands before resume
The -exec-continue command must be last in the GDB
Hardware Debugging launch sequence to ensure any run
commands are executed before application code.

Change-Id: I1eae32698e80d1c1b36da4bbdf21d85d363bcd05
Signed-off-by: John Dallaway <john@dallaway.org.uk>
2017-10-08 12:37:08 +01:00
Doug Schaefer
11dcec43f2 Add UI tests plugin for CMake. Fix a couple of bugs it found.
Also restructures the pom.xmls to put the modules in the top level
so we can order them to have the test plugins build after them.

Change-Id: I2f0e4ebd252791fb8844cdf0f635d574946207aa
2017-10-06 16:36:51 -04:00
Jonah Graham
cfd6e9867e Bug 525666: Fix NPE when DebuggerConsole closes before async code can run
Fix the async calls that can run after the DebuggerConsole is closed
and removed so that they can't NPE.

Change-Id: I7905ee18a92be0ff5de25a4c8d770a694b06bfe1
2017-10-06 10:59:19 -04:00
Jonah Graham
94b8301bbc Bug 525667: Allow IGDBFocusSynchronizer to be an optional service
All the uses of the service in the code base allow it not to exist,
so allow the service not to exist at launch too.

Change-Id: I907038907e87d5fbc882272b6e41cd1587617281
2017-10-06 10:59:13 -04:00
Jonah Graham
7af3055b85 Bug 525664: Add missing close in new Debugger Console
On Windows the PTY's waitFor will be blocked (and therefore not
see debugger termination) until the handle to stream is closed.

Change-Id: Ifa079a064733a12a03b07c3e7361e1d19d2b8be8
2017-10-06 10:59:06 -04:00
Thomas Corbat
07e8917eb5 Bug 525645 - Named type specifiers in friend declarations
Change-Id: Ia67fb35ef3d20cde97322c07e697e3437c6c769d
Signed-off-by: Thomas Corbat <tcorbat@hsr.ch>
2017-10-06 09:41:53 -04:00
Michael Woski
a7be934ba2 bug 525288 - resolve partial template specializations in
CSourceHover/OpenDeclaration

Change-Id: I61c06fc453499ddc2b1af73a8a69d4b648d473c3
Signed-off-by: Michael Woski <woskimi@yahoo.de>
2017-10-05 17:58:21 -04:00
Nathan Ridge
89ebafa72e Bug 512297 - Decrease the template instantiation depth limit to 128
The previous limit of 256 was not sufficient to prevent stack
overflows in some cases.

Change-Id: Ied9171ed3020f2de7932fa9ee50780bd207d8707
2017-10-04 12:21:20 -04:00
Nathan Ridge
98e1153ba0 Add a comment describing the intended uses of CPPSemantics.getCurrentLookupPoint()
Change-Id: Ib4ba467a093873c16a1ff155e27c38c11a7590ce
2017-10-04 12:07:35 -04:00
Felix Morgner
d47cb6c4ea Bug 495842: Add a quick fix for codan problems that ignores them by adding a @suppress comment
Change-Id: I760d2d435010f219bdb94273a6450e4163fe472e
Signed-off-by: Felix Morgner <fmorgner@hsr.ch>
2017-10-04 11:13:54 -04:00
Nathan Ridge
bf73bb58bc Bug 512297 - Impose a limit on the nesting depth of template arguments
This avoid stack overflows when processing code that has very deeply
nested template arguments.

Change-Id: I748e2d827fd1e7842737ec0652cf3733ae9962b1
2017-10-03 22:26:19 -04:00
Nathan Ridge
c7e475e50e Bug 524338 - Make sure SemanticHighlightingTest.teardown() is called even if an exception was thrown during the test run
Change-Id: Idd19728c2e920d1bb8a590863c40d8646f916e1a
2017-10-03 22:25:02 -04:00
Nathan Ridge
33d33a8cd6 Bug 525350 - Ensure a lookup point is always set during indexing, code analysis, and code completion
Also push a more accurate lookup point in a few places.

Change-Id: I635569178d8d9afd23f7782aeebdaed714f1a10d
2017-10-03 22:23:09 -04:00
Nathan Ridge
e1b68206ae Bug 524258 - NPE in QuickAssistProcessor.runOnAST()
Change-Id: I65653080a5a8f20567809d0d43126aff5a974a46
2017-10-02 21:26:28 -04:00
Nathan Ridge
20a88df65c Bug 399147 - Make 'Find References' find using-declarations
This is a revised approach for fixing this bug by giving using-
declarations implicit names for each delegate binding.

Change-Id: Ib9695c30258b8cb322ae1548ab022e357318135c
2017-10-02 02:44:02 -04:00
Nathan Ridge
e7c64e785b Bug 515417 - Improve handling of friend classes in PDOM
According to the standard, if a friend declaration is the only
declaration of a class type, then that class type is only
visible to argument-dependent lookup until another declaration
is encountered.

Bug 508338 attempted to implement this rule for PDOM class
types by not storing the class type in the index at all when
that first declaration is encountered. However, this meant
not recording the friend relationship either, which regressed
CompletionTests.testTypes_FriendClass (which was then disabled).

Bug 512932 implemented this rule for AST class types in a
different way, by keeping track of which names are visible to
ADL only.

This change reverts the fix for bug 508338, and extends the
approach from bug 512932 to PDOM class types. It also re-
enabled CompletionTests.testTypes_FriendClass which now passes.

Change-Id: I9a845fdba514339d86c0c3761a85cf34a17a5613
2017-10-02 01:59:31 -04:00
xgsa
10eb43465e Bug 479289 - Eclipse fails to parse gtest output for parametrized tests
Change-Id: Ieec10941c76a8ed5e1820ff165b1e673fbc1dd2f
Signed-off-by: xgsa <xgsa@yandex.ru>
2017-10-01 00:03:34 -04:00
Doug Schaefer
5228d19300 UI for adding toolchains for Core Build. New Generic Target Wizard.
Provide a way to add new toolchains. Also start of UI to allow for
reordering them to help with toolchain selection for targets.

New Generic Target Wizard for the new wizard2 extension point for the
Launch Bar Target UI.

Change-Id: I60635ab27dad5b69df72c339337473183dcf711a
2017-09-28 13:42:58 -04:00
Nathan Ridge
80dc8d9c25 Bug 513105 - Avoid pushing a null lookup point in CPPVisitor.createType()
ArrayDeque doesn't allow null elements.

Change-Id: Ib610cfedf02232d30b4fc4e1b4d4d5ba45d7aee3
2017-09-28 12:13:57 -04:00
Nathan Ridge
bb9d1db323 Bug 518937 - Apply declaredBefore() filtering to index bindings found in a namespace scope
Previously, such filtering was only done in resolveAmbiguities(),
which was too late for name lookup for proceed to an enclosing
scope if it did not find valid candidates in the namespace scope.

Change-Id: I435d7be1aff5344985c1bbb201bf5d383d43fe8d
2017-09-27 18:58:02 -04:00
Marc-Andre Laperle
9dbf2af399 lsp4e-cpp: Generate LSP FileEvents from ResourceChangeEvents
FileEvents are useful for indexing and lsp4e (so far) does not send
them. It is not clear whether or not this will be implemented in lsp4e.
In the mean time, lsp4e-cpp can have its own mechanism to generate
the events.

Change-Id: I09aac4fda7755260f47b73fd683ca6d2ad317f81
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2017-09-26 14:07:03 -04:00
Nathan Ridge
2fe856426c Fix a couple of potential leaks of the PDOM write lock
This fixes a couple of places where a call to
PDOM.acquireWriteLock() is not paired with a call to
releaseWriteLock() in a finally block.

Change-Id: I45a8bd9a2f6585bb4c4bc1f726fea6f9eba5fb43
2017-09-26 13:39:54 -04:00
Nathan Ridge
64709c980d Bug 513105 - Store the current lookup point in a thread-local static stack rather than passing it around everywhere
Change-Id: I3da7326d1ce6bede8d4787d98f38fb2064288338
2017-09-25 12:51:22 -04:00
Nathan Ridge
9869cbc9ba Bug 522461 - NPE in ParameterGuesser.createVariable()
Change-Id: I68c2588866c9b4228134643bfa246452ee483c80
2017-09-25 12:49:38 -04:00
Nathan Ridge
2a94c46209 Bug 522459 - NPE in ExecRangeBasedFor.loopOverArray()
Change-Id: Ife66cef5ca07655371bf83489881d9f2baf61f92
2017-09-25 12:48:12 -04:00
Jeff Johnston
f849b09679 Add some missing feature pom.xml files for Sonar job to work
- org.eclipse.cdt and org.eclipse.cdt.sdk features have same
  name as plug-ins so we need a pom.xml to distinguish the
  groupid for Sonar job to work

Change-Id: I7098021d40fec66ee5a6dc093bd12c3ee896c4f7
2017-09-20 13:39:05 -04:00
Nathan Ridge
2aeb75d147 Bug 522509 - Handle typedefs in __is_class builtin
Change-Id: Ief3efa8e660ab1f7ec11788be8dad69da2501aa6
2017-09-20 00:15:59 -04:00
Jeff Johnston
ef5147a046 Reinstate commit 709689b36e
- This commit is still needed to allow CDT Sonar job to run
  so that features that have same name as plug-ins
  will be distinguishable by Sonar job

Change-Id: I3eb3f3cf94d5f4338d72c5d19d0baf2f7506c388
2017-09-19 15:33:21 -04:00
Michael Woski
709689b36e Bug 521016 - resolution error for nested alias template specialization
from
index


Change-Id: Ia36f096cc4765341a62d8c6139a487c714854e97
Signed-off-by: Michael Woski <woskimi@yahoo.de>
2017-09-19 19:29:35 +02:00
Nathan Ridge
9011fe1a95 Bug 522066 - Use the declarator as the key for the recursion protection set in createAutoType()
Previously, the decl-specifier was used as the key, but a decl-specifier
can be shared by multiple declarators, so seeing the same decl-specifier
against doesn't necessarily mean we have infinite recursion.

Change-Id: I165088c5379d412d1c31f2655c20a02629fbe596
2017-09-19 00:28:34 -04:00
Andrey Loskutov
398307d9bb Bug 522411 - ConcurrentModificationException below
CModelListener.addLastRecentlyUsed (thrown in
LinkedHashMap$LinkedHashIterator.nextNode)

CModelListener reacts on all the resource events, but is NOT MT-safe due
the not guarded access to the "fLRUs" map, which can be iterated AND
modified at same time by different threads.

This commit introduces synchronization on the "fLRUs" map field. This is
safe as the field is private and not exposed to other objects, and the
code inside synchronized block does not call into other locks which
might interfere.

Change-Id: I3e601f02e93e40a1454c9a581fa46378904eb3dc
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
2017-09-18 17:01:06 +02:00