1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00
Commit graph

26153 commits

Author SHA1 Message Date
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
Michael Woski
4e7354e1b0 Bug 456224 - CPPDeferredClassInstance not bound to partial template
specialization

Change-Id: I91482bf3f27becaea796a2c20875f97d92157644
Signed-off-by: Michael Woski <woskimi@yahoo.de>
2017-09-16 09:08:21 +02:00
Andrey Loskutov
eb70c04ceb Bug 522176 - NullPointerException in DeltaAnalyzer.processResourceDelta
Change-Id: I25606e5c1f4e15e9048df139bb6a2e60f8214508
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
2017-09-13 11:24:38 -04:00
Nathan Ridge
dfd7a7164c Bug 521817 - Implement PDOMCPPAliasTemplate.update()
This ensures that if the target type of an alias template changes,
the target type is updated in the index during an incremental index
update, without requiring a full index rebuild.

Change-Id: I8800e3c1701409276f8db64000499a5fa9caf6a9
2017-09-13 11:23:03 -04:00
Nathan Ridge
39795a203a Bug 521848 - NPE in CPPFunctionTemplateSpecialization.equals()
Change-Id: I666c1a5d21aa7b644a6ebdc92be3ee51acda42d2
2017-09-12 19:48:01 -04:00
Michael Woski
c5b4657220 bug 521820 - don't filter alias template for CPPASTNamedTypeSpecifier
Change-Id: Ie66b148aabaf7f73bb639359c46d3d2d974c305f
Signed-off-by: Michael Woski <woskimi@yahoo.de>
2017-09-12 19:46:34 -04:00
Doug Schaefer
feed2bbf85 Disable Mac signing of the standalone debugger app.
Change-Id: Ie39f65b70206354b73b2a69a9734dbeba3974c6f
2017-09-11 13:37:22 -04:00
Jeff Johnston
a985a9753f Bug 522077 - New Autotools project doesn't open source file by default
- add open file process to Autotools C ANSI hello world template.xml
- add open file process to Autotools CPP ANSI hello work template.xml
- add open file process to Autotools Shared library template.xml

Change-Id: I2fcba56973374d00006f8ce5664581f3fcc419cf
(cherry picked from commit 41e54f1656)
2017-09-11 11:49:01 -04:00
Doug Schaefer
d8cc0751ae Update feature versions to CDT 9.4.
Also remove remaining pom.xmls for feature projects.

Change-Id: I78d6335f92d70ad2699b8a25801ff72d2935aefe
2017-09-11 11:18:42 -04:00
Doug Schaefer
c3f3da9f25 Core Build - add support for Generic target
Adapts to LaunchBar's new Build Tab extension.

Change-Id: Icad41a7083f4389a546234d2835a9c4b60fa0eae
2017-09-07 15:52:28 -04:00
Nathan Ridge
47fe12a179 Bug 521543 - Correctly identify narrowing conversion to boolean
Change-Id: I07672f5043cbb68070185d3d7d4993794b9caa2b
2017-09-07 01:32:17 -04:00
Nathan Ridge
e75a209b9f Bug 521274 - Defer execution of constexpr function body until function is fully instantiated
Change-Id: I35a63d15e7bfa7d3db98235eaa9dfe23e28950ac
2017-09-07 01:30:34 -04:00
Nathan Ridge
398ca82b48 Bug 521265 - Check that the platform is running before querying bundle group providers in CCorePlugin.getCDTFeatureVersion()
Change-Id: I5910e8c7decd7c8a347ca640f9c99875ad95fcf6
2017-09-07 01:26:09 -04:00
Martin Oberhuber
a0ab38124c Bug 519886 - eclipse CDT failed to create PTY on macOS 10.13 beta
Fixed by getting rid of legacy code for opening a master pty, and
copying the related code from org.eclipse.cdt.core.linux instead.
Only getpt() had to be replaced by posix_openpt(). Compiled on
OSX 10.12 - tested on MacOSX 10.8 and 10.13 beta 7 (64-bit each).

Change-Id: Idade001aed41abafc0d500695a4b51179bb9b738
Signed-off-by: Martin Oberhuber <mober.at+eclipse@gmail.com>
2017-09-04 06:35:15 -04:00
Martin Oberhuber
1019030e74 Bug 521788 - spawner doesnt kill child process on MacOS X
Fixed by copying code from org.eclipse.cdt.core.linux that
contains the fix from bug 119387 : set the process group by
calling setpgid() when forking a process, and use killpg() for
killing the entire process group on termination.

This also aligns MacOS code fully with Linux code. Tested on
MacOSX 10.8 and 10.13 beta. Binaries will be submitted with the
related fix for bug 519886.

Change-Id: I87df87caa88cff60b4d9eee2252252234d1a4f84
Signed-off-by: Martin Oberhuber <mober.at+eclipse@gmail.com>
2017-09-04 06:35:15 -04:00
Nathan Ridge
84689e06fd Bug 520913 - Improvements to HeuristicResolver
- Have resolveUnknownBinding() run the full "resolve unknown type"
    logic if the binding is a type.

  - Handle EvalTypeId

Change-Id: I97946453755ddcf6f382195ddb9fc7dcb2672b68
2017-09-02 16:32:01 -04:00
Michael Woski
f546a833d6 Bug 520913 - hover / open declaration for decltype and typeof keywords
Change-Id: I15db25080aa476e3e0e6f9c6ce063e9bd1e2b2b4
Signed-off-by: Michael Woski <woskimi@yahoo.de>
2017-09-02 08:35:10 +02:00
Marc-Andre Laperle
11817c1c6a A basic LSP4E integration with Clangd
This plug-in adds an simple integration between LSP4E and Clangd.
It simply launches clangd when opening C/C++ files with the
Generic Editor.

To try it, you need to:
- Import the projects in your Eclipse workspace (you can only import the
lsp4-cpp ones, the sources for CDT are not needed)
- Open lsp4e.cpp-staging.target and set it as the target platform
- You need to have clangd built and on the PATH. See
https://clang.llvm.org/get_started.html
- Start Eclipse: right-click on a project > Run as > Eclipse Application
- In the new Eclipse instance, you can right-click on a C/C++ file >
Open As > Generic Editor. This should make use of clangd, providing some
basic diagnostics and formatting commands.

This should help the Eclipse community to start playing with Clangd.

Change-Id: I688d3a952dbc80d9f61186178f3c8a033afcc587
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2017-09-01 11:31:57 -04:00
Nathan Ridge
33a7f1e533 Bug 520999 - Map PDOM class types to AST before looking up constructors
Change-Id: Iac865cbde8ed4ba2b002eea0da7d943598d33bc1
2017-08-24 00:57:23 -04:00
Nathan Ridge
30c0a1da7c Bug 520965 - NPE in AbstractCPPClassSpecializationScope.getBindings()
Change-Id: I02494b27bf697821361a896235b38075b161f0e7
2017-08-22 02:31:15 -04:00
Jonah Graham
fb0df4a130 Cosmetics.
Fix bad line endings in memory/**/*.java

Change-Id: I34b4966b7d3fd965ea43b2f676b77ae9b7b4f2aa
2017-08-18 21:24:31 +01:00
Jonah Graham
9913afd1eb Update target platform to Release repo for Orbit
The S builds have been removed.

Change-Id: I53616d38ba497097d55605f73b45d7c2f36c357b
2017-08-15 11:51:43 +01:00
Jonah Graham
5acb4c10d8 Bug 520952: Use filename when handling function breakpoints in console
Change-Id: I6bcdc658bf4c9453cdbe156808b292296a214fde
2017-08-15 08:35:46 +01:00
Michael Woski
e8bfecea0b Bug 456579 - Improve CSourceHover and OpenDeclaration for TemplateIds
CSourceHover did not know how to handle UnknowMemberClasses

Change-Id: I4ef6a4ad794e670c4d5e9ccc9cea204f8d273f2a
Signed-off-by: Michael Woski <woskimi@yahoo.de>
2017-08-11 23:10:39 -04:00
Thomas Corbat
c7b6aa3bd5 Bug 520893 Pack expansion in IASTTypeId is lost
Change-Id: I9137d028c56ce62ee02571099a7a5ab1b2b481cd
Signed-off-by: Thomas Corbat <tcorbat@hsr.ch>
2017-08-11 14:29:02 +02:00
Michael Woski
27b467cb11 bug 520805 - [codeassist] HeuristicResolver can't resolve enum scope
Change-Id: I8c820bd91c1f5775466697c2e0c63351ce69bcba
Signed-off-by: Michael Woski <woskimi@yahoo.de>
2017-08-10 16:53:33 -04:00
Michi
e252398ee1 Bug 520783 - wrong AccessContext for heuristically resolved
CPPUnknownMemberClass

Change-Id: I5a24c7df1dc3b4c270c60b93327190c0461c4cd0
Signed-off-by: Michi <woskimi@yahoo.de>
2017-08-10 22:15:21 +02:00
Michi
b0ce8bc3fb bug 520470 - [codeassist] HeuristicResolver & qualifiedType resolution
Change-Id: I9569d776981dbf87a075aebcd0c07ce9f1470f47
Signed-off-by: Michi <woskimi@yahoo.de>
2017-08-10 15:43:59 -04:00