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

14412 commits

Author SHA1 Message Date
Igor V. Kovalenko
b84b0f62eb Test arithmetic conversion from larger unsigned operand type 2023-02-04 09:55:07 -05:00
Igor V. Kovalenko
57008babd8 Fix arithmetic conversion from larger unsigned operand type
Fixes: 16944a0de7 ("Arithmetic conversions for unary and binary expressions, bug 231859.")
Closes: https://github.com/eclipse-cdt/cdt/issues/265
2023-02-04 09:55:07 -05:00
Philipp Wendler
cf834dd838 Add definitions for integer overflow builtins from GCC
Closes #271
2023-02-04 09:51:34 -05:00
Jonah Graham
a4ba7173e8 Mark DocCommentHighlightingTest as flaky
This test regularly fails on CI builds, but the test passes ok.

Fixes #259
2023-01-30 14:55:55 -05:00
Jonah Graham
ff858fee08 Convert test to JUnit5
This is a pre-requisite to be able to use flaky test tag
2023-01-30 14:55:55 -05:00
Jonah Graham
cbbbe44553 Provide a base UI test case for JUnit5
This is the analogous class to BaseUITestCase, but for JUnit5.
2023-01-30 14:55:55 -05:00
Jonah Graham
8ff58a5262 Remove field in test
The field implies that the fSourceViewer has a longer life
than it does. But reality is that the viewer is only
valid until the editor gets reopened while the test is
running.
2023-01-30 14:55:55 -05:00
Dominic Scharfe
22ee440b88 Issue #254: Constructors of inner classes not resolved properly
- add test case to reproduce #254
- add special case to detect constructors which were declared in the
index file set of the tu
2023-01-28 11:01:08 -05:00
Igor V. Kovalenko
fe7a9d7856
Do not allow structured binding initializer referencing introduced name (#241)
If name lookup ends up with a variable, additionally check if node being
resolved is part of the structured binding initializer introducing found
variable. If this is the case, produce problem binding and report structured
binding declaration error via codan.

This change also prevents infinite recursion trying to resolve auto type of
introduced variable while evaluating such problematic initializer.
2023-01-28 10:54:09 -05:00
Igor V. Kovalenko
2776d17014 Drop three-way comparison from C parser, this is C++ only. 2023-01-28 10:52:07 -05:00
Igor V. Kovalenko
a90cbe1736 Add simple evaluation for c++20 three-way comparison 2023-01-28 10:52:07 -05:00
Jonah Graham
a0f91038e0 Add and correct since tags for new API in 8.1.0
o.e.cdt.core 8.0.0 was released as part of CDT 11, so this new
non-breaking API needs a version bump to 8.1.0.
2023-01-28 10:52:07 -05:00
Igor V. Kovalenko
97dccc2c1e Fix precedence for c++20 three-way comparison operator 2023-01-28 10:52:07 -05:00
Igor V. Kovalenko
f13157720e Add operator name test for c++20 three-way comparison 2023-01-28 10:52:07 -05:00
Igor V. Kovalenko
ae8da7ef88 Add variable read/write flag test for c++20 three-way comparison 2023-01-28 10:52:07 -05:00
Igor V. Kovalenko
a8b3401a47 Add rewriter test for c++20 three-way comparison expression 2023-01-28 10:52:07 -05:00
Igor V. Kovalenko
5eb89637b2 Add test for c++20 three-way comparison expression 2023-01-28 10:52:07 -05:00
Igor V. Kovalenko
5622e59e5f Replace useGNUExtensions flag in test code with scanner configuration id
Add STD and GNU scanner configuration ids and pass these as needed instead of
boolean flag useGNUExtensions. This will be used later by C++20 scanner tests.
2023-01-28 10:52:07 -05:00
Igor V. Kovalenko
ff8ac10f6e Add basic support for c++20 three-way comparison operator 2023-01-28 10:52:07 -05:00
Igor V. Kovalenko
ccf8053680 Fix copyright header typo 2023-01-26 14:18:41 -05:00
Igor V. Kovalenko
8fc812ee27 Fix pack expansion for array elements
When parameter pack contains array type the EvalCompositeAccess.getType() will
attempt to return type of array element.

Fix this by providing EvalPackAccess which returns pack elements as is.
2023-01-26 12:15:40 -05:00
Erwin Waterlander
7911ac8a2b Bug 552070 - Build not configured correctly error while building a project
https://bugs.eclipse.org/bugs/show_bug.cgi?id=552070

After closing and opening a Core Build project (Make, CMake,
Autotools, and Meson), the project could not be built for Debug
anymore. Error: "Build not configured correctly".

Restoration of the debug build configurations failed, because the
settings had been removed during closure of the project.
CBuildConfiguration(IBuildConfiguration config, String name)
failed with a CoreException. The CBuildConfigurationManager
silently catched the exception and put the IBuildConfiguration for
debug in the noConfigs list.
2023-01-25 14:23:14 -05:00
Jonah Graham
7bcef26f65 Make Select Configurations Dialog resizable
Fixes #240
2023-01-18 15:50:45 -05:00
John Dallaway
1c7aa967a0 Add support for DW_FORM_line_strp 2023-01-16 20:47:09 +00:00
Jonah Graham
781646e0ef Account for new header layout in DWARF v5
Fixes #198
2023-01-16 20:47:09 +00:00
John Dallaway
a949830dd3
Support multiple MSYS2 64-bit registry names (#243) 2023-01-15 16:52:20 +00:00
TheShermanTanker
c98aae4c6a Update comment because #warning is no longer an extension in C23 2023-01-01 13:51:32 -05:00
Jonah Graham
503ca0af58 Bump version of cdt.core in preparation for 11.1.0 dev 2023-01-01 13:51:32 -05:00
Jonah Graham
48c5abfcb3 [releng] Update to latest maven-compiler-plugin version 2022-12-09 12:24:55 -05:00
Jonah Graham
b87a45520a [releng] Prepare repo for CDT 11.1.0 development 2022-12-09 12:24:55 -05:00
Jonah Graham
fcf2a16614 [releng] Bump versions of bundles modified since 11.0 release 2022-12-09 12:24:55 -05:00
徐持恒 Xu Chiheng
352630b8ea
ProcessFactory.java : envpToEnvMap() consider null envp (#195) 2022-12-06 16:05:28 -05:00
徐持恒 Xu Chiheng
ac64d4aedc
refactor ProcessFactory to help debugging (#191) 2022-12-06 13:20:38 -05:00
徐持恒 Xu Chiheng
9114ac3ff2
refactor ProcessFactory.java to put all process creations in one function. (#188)
* refactor ProcessFactory.java to put all process creations in one function.

Prerequisite of #187

* add missing $NON-NLS$ tags
2022-12-03 12:06:28 -05:00
Jonah Graham
1087dc5f22 [releng] Require target platform bundles as minimum version
Without setting dependent plug-ins to minimum version to match the
target platform we are aiming for we can imply (and therefore let install)
CDT into older versions of Eclipse where CDT does not actually work.

This can be exposed in very odd ways, such as IllegalAccessError, when
platform has allowed API changes.

However, rather than update every single bundle in CDT, only the
o.e.cdt.core/ui bundles are being updated as this should achieve the
desired result without every other bundle needing to be touched.

See Bug 536448
Part of #77
2022-11-29 16:20:31 -05:00
Jonah Graham
1d0550a9f1 Cosmetics. 2022-11-21 18:57:10 -05:00
Jonah Graham
73fae6d6c1 Add missing @since 2022-11-21 18:57:10 -05:00
Jonah Graham
60f668f259 Resolve deadlock in Jobmanager related code
Because of
[changes](https://www.eclipse.org/eclipse/news/4.26/platform_isv.php#JobManager_Implementation)
in Eclipse Platform where the jobmanager's behaviour changes (within
the API), the consumers of the jobmanager can deadlock due to incorrect
assumptions.

In particular, where we call job.schedule(), the callback can happen
in different threads to the IJobChangeListener's. As CDT was holding
a lock while calling schedule that is also required in those
listeners, we need to no longer lock when calling schedule.

As the code already dealt with the case of when there was a delay
between the job.schedule() and where & when it was run, we can
move the schedule call out of the synchronized block.

Fixes #81
2022-11-21 18:00:03 -05:00
Jonah Graham
b8bd15844b Bug 571722: Add ALL_FLAGS for scanner discovery
This change adds the ALL_FLAGS that does not limit tool options to
those declared as IOption::isForScannerDiscovery when launching the
compiler to discover compiler built-ins.

This is needed as many other flags, either entered manually in "Other
flags" or some of the existing flags with checkboxes such as "-ansi",
"-fPIC", and "-fstack-protector-all" which all affect scanner discovery
as they can all change what macros are built-in to the compiler.

The current solution has as a drawback that some settings, like -I and -D
then appear twice. For example in the "Includes" node in the "Project
Explorer"

My only reservation about this change is if there is an option
that can be specified successfully at build time, but when used
at scanner discovery time causes the compiler to fail, or return
incorrect results. Therefore I have added a new field,
excludeFromScannerDiscovery to tool options (buildDefinitions
extension point) that allows tool integrators to always exclude
a command line option from ALL_FLAGS. I have also added
a new "Other flags (excluded from discovery)" to the
"Miscellaneous" tab to allow compiler options to be entered
by the user.
2022-11-21 10:46:49 -05:00
John Moule
c4c63453c3 Bug 580015: add support for multiple bin parsers #75
Fixed build props of new test plugin.

Fixed test, cleanup project afterwards.
2022-11-18 10:55:40 -05:00
John Moule
7759af22d6 Bug 580015: add support for multiple bin parsers #75
Removed ICBuildConfiguration.getBinaryParserId() and
IToolChain.getBinaryParserId(). Replaced with methods that return a list
of IDs.

Updated API changes doc.

Rearranged tests so that the test for IToolChain is in a new gcc test
plugin.
2022-11-18 10:55:40 -05:00
John Moule
c52de83035 Update for major version bump
Update since tags to 8.0.
Remove api filter.
Fix other since tags after removing of api filter.
Remove interface defaults.
Add default implementations where necessary.
Update tests - TBC.
2022-11-18 10:55:40 -05:00
John Moule
234e98d71d Bug 580015: add support for multiple bin parsers
Added ability to return a list of binary parser IDs, rather than a
single ID. This supports build configurations that have multiple
binaries with for example cross toolchains.

Change-Id: I1b7e47bf6a86bbd9f1c6b9646d008bac9479417d
2022-11-18 10:55:40 -05:00
Erwin Waterlander
8c9faa1a50 Indexing source files when multiple toolchains are used.
This change solves the indexing of C/C++ files when multiple
toolchains are used in a single Makefile. This is for the use case in
which one (Linux) gcc compiler plus one or more custom embedded C
compilers (all producing ELF format binaries) are used.

To get proper indexing we need to know for each resource which
toolchain was used. The sub build configuration (via extension point
org.eclipse.cdt.core.buildConfigProvider) extends
StandardBuildConfiguration.java, and overrides method IToolChain
(List<String> commandgetToolChain). tcMap is filled with a map of
toolchains per resource. The primary toolchain keeps pointing to the
gcc toolchain.
2022-11-16 11:26:25 -05:00
Jonah Graham
3f682d7b00 Update to latest Orbit which means new mockito version
Note that FileBasedErrorParserTests had to change because of some
Tycho incompatibility with JUnit's ParameterizedTest. It works
in the IDE, but not in maven.

The correct fix is to resolve the tycho settings, see Bug 569949
for a previous example. It may also be simply resolved by updating
to Tycho 3.0.0. However I want to get this change in as
at the moment CDT.setup is broken and that is impeding developers.
2022-11-14 16:04:19 -05:00
Jonah Graham
a27d4a3bb7 Mark for removal API not accessed within CDT (or Embed CDT) 2022-11-11 11:34:37 -05:00
Jonah Graham
1893069eb5 Remove unmaintained LSP and DAP support from CDT
Fixes #139
2022-11-09 19:47:22 -05:00
Jonah Graham
cc67bd3b59 Handle all errors and runtime exceptions that may be thrown
We can fail to regain our lock in other cases than just
operation cancelled exception, so capture all of those
cases to throw an FailedToReAcquireLockException.

Also, fix another finally block that assumes it has the lock.

Fixes #128
2022-11-09 07:10:10 -05:00
Jonah Graham
9026f53fd5 Remove deprecated binary parsers and supporting code
These binary parsers have been slated for deleting for
a while and are replaced with 64-bit compatible
versions.

Some methods still refereneced the 32-bit variants
and have been updated to the fully functioning
64-bit variant.

The older parser IDs are preserved (forever?) so that
old projects can be opened without needing to do anything.
The IDs now point at the new implementations.

See also Bug 562495
2022-11-07 20:58:25 -05:00
Jonah Graham
14dfefddb5 Add extension point schema for BinaryParserPage
This extension has been in existence since very early days
of CDT, but it never(?) had a schema, so the improvements
done in #136 will now show errors in use of this extension.
2022-11-07 20:58:25 -05:00