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

14219 commits

Author SHA1 Message Date
Alexander Fedorov
8dbf024ab8 Bug 572552 - CDT releng: update versions to 10.3.0
Added missed license headers
Updated baseline for the parent pom to CDT 10.2
Updated version for pom.xml to 10.3
Updated version for features and bundles to CDT 10.3
Updated copyright for about.properties to be 2021
Incremented version + 100 where needed

Change-Id: I79666fcc0402fee6607499d7dce1eaf87a5f446d
Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
2021-04-04 16:17:25 -04:00
Marc-Andre Laperle
8b3998eb41 Bug 320186 - Support MSbuild error pattern in VC error parser
Change-Id: I2bea83a4ec79104f4ce7099ced2a7cde1c77a129
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2021-04-02 22:36:15 -04:00
Jonah Graham
cdd00392c1 Bug 571472: Don't resolve multi-line strings
Change-Id: Id6a8b208cb6bc965a2c8d781ba41bca3b3094685
2021-02-25 07:39:04 -05:00
John Dallaway
c66d331a95 Bug 570992: Fix templates extension point documentation
The "filterPattern" attribute is used to filter templates by language
ID, not by build configuration ID.

Change-Id: Idd89fffc2ec3aefc3c1421b4cbbc7e1a19dbb7f3
2021-02-07 04:03:44 -05:00
Jonah Graham
afee900b24 [releng] Fixup API error due to missing verion bump
Change-Id: I149aeb8f148f0f223e7ec09a73e153df5be68836
2021-02-03 09:50:12 -05:00
Jonah Graham
9c370cfcf0 Bug 521515: Update to JNA 5.6.0
Change-Id: Id56f6366e0bbaa33b1d0967cd64487fc173b3833
2021-02-02 21:14:08 -05:00
Jonah Graham
64e21a93c4 Bug 499777: Flaky and slow test tags
to exclude flaky and slow tests from gerrit runs and main build
tests can be tagged as such. See BTreeExpensiveTests for example
of a slow test and Bug_303953Test for an example of a flaky one.

The root README.md has a few notes on converting tests to JUnit5
and adding annotations to mark them slow or flaky.

Change-Id: I03a4004112e6a500d8ec2771d68f14f7dc5f67fb
2021-02-01 11:32:58 -05:00
Jonah Graham
5c82be881d Bug 569839: Provide a new JUnit5 base and utility classes
Change-Id: I8682f4702cfa0cad7d0452ca48d1ab74eeb1dbdb
2021-02-01 11:32:53 -05:00
Michael Uhl
28589d32a3 Bug 568957 - Header indexed with missing significant macros on multiple
headers with pragma once syntax

Change-Id: Iada2129ec7bf4f239ffdaa13ca3e33e322aa1025
Signed-off-by: Michael Uhl <Michael.Uhl@NashTech.Com>
2021-01-22 11:58:45 -05:00
Simeon Andreev
2962203bd2 Bug 569581 - Rethrow IOException in ElfParser.hasInterpProgramHeader()
This change adjusts behavior in ElfParser.hasInterpProgramHeader()
(added for bug 512822) to throw an IOException that occurred, as opposed
to logging the exception and continuing. This excludes exceptions thrown
by Elf.getSections() indicating that ELFhdr.ELFCLASSNONE is read; a new,
more specific IOException type is defined to allow handling this as a
special case.

A "generic" IOException indicates an I/O problem with the binary. E.g.
the binary can be deleted by the user or by Eclipse, while being visited
in CModelManager. If hasInterpProgramHeader() returns instead of
throwing, more problems can occur "later on".

Change-Id: I8852d9cbaa17dc97f668bb1666e9b046bbde1fca
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
2021-01-14 09:10:28 +01:00
Stephan Oostveen
fe2d08b44a Bug 500798: Mark GCC template init message as info
When GCC skips template instantiation in its output it was parsed
as an error instead of an informational message.

Change-Id: If5dca2d1430a6b5e9cb9317649dea8291bfc0356
Signed-off-by: Stephan Oostveen <stephan.oostveen@nextlevel-electronics.com>
2021-01-11 15:18:34 -05:00
Jonah Graham
8f04a3bc34 [releng] Bump version number
Change-Id: I770d1842e4efeb3261db698356f4819e04f1f4a8
2021-01-11 15:14:09 -05:00
Simeon Andreev
fd09187f9a Bug 383348 - Replace actions with invalid menu paths in CDT UI
This change adjusts replaces the following actions (part of action set
org.eclipse.cdt.ui.buildConfigActionSet) with commands and menus:

* org.eclipse.cdt.ui.manageConfigsAction2
* org.eclipse.cdt.ui.buildConfigMenuAction
* org.eclipse.cdt.ui.wsselection

This is done to avoid menu extension errors on perspective
customization, due to problematic code in CustomizePerspectiveDialog. In
particular the customize perspective dialog will populate main menu
submenus only after going over actions; this causes the menu paths of
the actions above to be detected as invalid, despite actually being
valid and functional.

The original action classes are deprecated and marked for removal. The
respective classes are defined in non-internal packages; removal would
be considered API breakage and so must be done in a major version bump.

Change-Id: I31517697689772395b7e1868ef4cab07ad946085
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
2021-01-05 20:28:50 -05:00
Jonah Graham
25cbbcd5b5 Bug 569839: Ensure that behaviour is same running tests without suites
This change renames all suites to be called ...TestSuite so that
the default includes don't pick them up. With the name ...Tests it
means that those tests referenced by the suite are run multiple times.

Tests which relied on being run as part of a TestSuite have been
refactored to run as individual tests by moving the logic from
the suite into the test (e.g. CommentHandlingTestSuite)

Tests that were not runnable have been renamed from ...Test to ...Tester
to match a convention already used in CDT.

Lots of tests did not use standard name (i.e. didn't end in no Test) so
this was fixed.

Many tests were really abstract tests, so the missing abstract was added,
e.g. ArrayTests

The default excludes in Maven behaviour differently than may be expected,
so rather than remove static inner test classes, update the excludes,
see pom.xml change

Change-Id: Ia91e12fe76c3ec2d914463a28400d21b9daf1910
2020-12-21 14:50:51 -05:00
Jonah Graham
7b6701f9ef Bug 569839: Add DefaultCCommentAutoEditStrategyTest to testsuite
This test started failing (and wasn't in testsuite previously) because
it had significant trailing whitespace in some tests.

The fix is to use ${whitespace_eol} which I have also added to some
of the javadocs to make it easier to find next time.

Change-Id: Ib364d8a400bcdeb21445dde8428e0fd4c77db990
2020-12-21 11:49:24 -05:00
Jonah Graham
75e281ffac Bug 569839: Restore the cleanupProject
This style is the JUnit3 way of doing JUnit4 @AfterClass. It was
commented out as part of Bug 564002 (commit 9e303185f9).

Change-Id: I56e2754f3cce447c47546c91cdc16b302e18b4a6
2020-12-21 11:49:24 -05:00
Jonah Graham
f3bee99f00 Bug 569839: Don't discard exceptions in tests
Change-Id: I710922fcc1b23d61d52fa1aa868b491bc26edf01
2020-12-21 11:49:24 -05:00
Jonah Graham
cb35c8daa2 [releng] Remove unused API filters
Change-Id: I960afcd99198918fe5f86983243b571c23a3c97f
2020-12-19 13:01:44 -05:00
Jonah Graham
c248620053 [releng] Increment feature and related versions to 10.2.0
Change-Id: Icd135a588920fa25fd846dc285db5f83e5ac7037
2020-12-19 12:11:25 -05:00
Torbjörn SVENSSON
05322656c6 Bug 539927: Do not mark "Removing unused section" lines as errors
The lines are printed by the GNU ld with the flag --print-gc-secions

Change-Id: Ie09229427a29e9959f8ffe4920a1645ad3dcb086
Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@st.com>
2020-12-02 10:53:11 +01:00
Torbjörn SVENSSON
0f3214ace9 Bug 569353: The mode output from ld is not an error
Change-Id: I1a29bd698c3b37d687bf76a416689df0a69aa50d
Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@st.com>
2020-12-01 08:34:03 -05:00
Simeon Andreev
d4c6168964 Bug 486033 - Add close button to CDT Build Console toolbar
This change adds a close action
(org.eclipse.ui.console.actions.CloseConsoleAction) to the CDT build
console.

CDT accessing a closed console via BuildConsoleManager will result in
re-adding the respective console page to the console view, if the
console page was closed.

Change-Id: Ifc4d4c6ed329f1c1c7e70f7903ed660ba85306c5
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
2020-11-29 15:14:40 -05:00
Simeon Andreev
a655f7b4a5 Bug 568926 - Build Console has no action to disable activation on output
This change adds an action to the CDT build console, to disable
activation on build output. The action uses the existing preference
"build console on top when building" from C/C++ -> Build -> Console.

The action icon is copied from platform debug UI, see:

org.eclipse.debug.internal.ui.IInternalDebugUIConstants.IMG_ELCL_STANDARD_OUT
org.eclipse.debug.ui/icons/full/elcl16/writeout_co.png (and @2x)

The change also ensures the existing preference works, as it currently
has no effect on not showing the build console on CDT build.

Change-Id: I0d94583b85e1a13f18d43de8c10355ccdab7f259
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
2020-11-29 15:04:00 -05:00
Jonah Graham
409a830c39 Bug 568375: Consistent versions for use of JAXB libraries
Change-Id: I86a6def37aed6c30a7591fd8dde4c174f6af98bb
2020-11-19 14:31:30 -05:00
Torbjörn Svensson
e632011f2c Bug 568728: Drop execute permission on files
Add enforecment script that verifies that only specified file types are
allowed to be mared as executable.

Change-Id: I4b40e3a46b03bfc78a9dcd52e8bf29cb079b7f3b
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-11-18 17:38:22 +01:00
Michael Uhl
6a9a8d409d Bug 567217 - template functions with lvalue and rvalue parameters of
template tests added.

Change-Id: I1fbbb45c6d895505a66ad917b1342365118e28d0
2020-11-13 21:22:39 -05:00
Torbjörn Svensson
d0c3b2aaff Bug 568079: Reducing transitions from JAVA to native code (part 1)
Advapi32Util.registryGetValues() is more efficient to fetch all the
values since the regiter only needs to be opened once.

XXX: Due to a cycle in the dependencies we need to split this
in two parts, this commit handles the core.native API change
and the next commit handles the use of the new API

Change-Id: Ifd9f1ccc44c652ef3b517278bd342a486155c5fb
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-11-11 12:29:53 -05:00
Nathan Ridge
821c7e2277 Bug 567217 - Avoid incorrect cache hits during the instantiation of alias template instances
Change-Id: I2f21b0a097f9d279b6e32d28acd68091e3b9ad76
2020-11-10 00:06:29 -05:00
Marc-Andre Laperle
c0b26f9993 Bug 568625 - "Invalid arguments" using __underlying_type outside template
ICPPUnaryTypeTransformation was meant to be used only when the
transformation is applied on a dependent type. But it was actually
always used when creating types for decl specifiers, regardless if a
dependent type was involved or not. The untransformed type was causing
issues because code dealing with ITypes doesn't apply the transformation
everywhere. It seems better to apply the transformation early when
possible and let the rest of the logic intact.

Change-Id: I1b6d77a857e901f71f00e935e75d24cea87c3118
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2020-11-09 12:06:57 -05:00
Marc-Andre Laperle
4a83dbfbdd Bug 568427 - 'alloca' not resolved when parsing in the context of clang-cl
Don't define __STDC__ for clang-cl, just like msvc. Added a new compiler
type to differentiate clang-cl from clang in order to be able to add the
define just for clang and not clang-cl. I initially thought that the
unresolved symbol was caused by a missing built-in symbol (_alloca) so I
started to implement MSVC as a separate language from GNU and not
pollute GCCBuiltinSymbolProvider with a new concept of compiler type,
etc. But it turns out _alloca is also in declared in the headers and was
inactive because of the wrongly defined __STDC__. So this version of the
fix of adding a compiler type to GPPScannerExtensionConfiguration is
much less intrusive and risky, although adding a new language could have
its merit in case of more substantial change.

Change-Id: Ieb27b7dbcc531b8fd3fe30777cd7f343fd3ba66f
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2020-11-08 22:28:19 -05:00
Marc-Andre Laperle
aff9a3332d Bug 568616 - Support for __is_same and __is_same_as (built-in equivalent to std::is_same)
IType.isSameType was doing pretty much already what was needed. Added
GCC 6.0 and 10.0 parser configs to enable these built-ins for the proper
versions.

Change-Id: Ifd2908e726c098fb07c9420b29e2cb26014419bf
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2020-11-08 21:04:31 -05:00
Marc-Andre Laperle
c61e879532 Bug 568408 - Add more GCC built-ins symbols in parser (based on GCC 10.2.0)
Add the built-ins that are straightforward to add, according to
https://gcc.gnu.org/onlinedocs/gcc-10.2.0/gcc/Other-Builtins.html#Other-Builtins

Change-Id: I0d680053018442e6d29a694a7128997b23828d2f
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2020-11-07 13:57:16 -05:00
Torbjörn Svensson
7f7a310c07 Bug 568079: Warnings as errors
All compile warnings for native code should be handled.

Change-Id: I5ee391fd24339cb55646dbd2980d2856fabe8ddb
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-11-05 20:24:54 -05:00
Torbjörn Svensson
1d2946184a Bug 568079: Hook into Eclipse tracing system for native code
After loading the spawner library, call the native method
configureNativeTrace() that will query the Eclipse platform for several
debug option strings.

Change-Id: I031bb2cdc04ba2675913b3b2e320039c28139638
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-11-04 13:37:24 -05:00
Jonah Graham
09b1f93e7e Remove unreachable code
Change-Id: I76fd2ceef7ef000f191b39fcb470cb5d560595a6
2020-11-03 14:33:15 -05:00
Jonah Graham
7e3bb7c9ab Remove unused C Nature from cdt core
There are no C/C++ files in cdt.core.

Change-Id: I1769f630e9bd9aa10397976e56d26c88a7f630dd
2020-11-03 14:29:40 -05:00
Jonah Graham
213088e43a Bug 530194: Don't assume that dwarf headers have valid positions
In cases where the dwarf headers say there is data at a position that
does not exist, the position call throws an exception. Prior to this
patch that exception, being a runtime exception, can cause the whole
IDE to exit in the case that the standalone debugger is used.

Change-Id: I7e12667890490a49ecd63785ea2cc7c02c08679d
2020-11-03 11:05:21 -05:00
Torbjörn Svensson
35530c50ef Bug 568079: Rework spawner to avoid memory leaks on Win32
Change-Id: I1253351d47d52e848867d7f9df61a66f9bd82d41
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-11-03 08:55:05 +01:00
Torbjörn Svensson
c598eedffa Bug 568079: Cleanup of native code
* Unify pointer checkes
* Avoid using negated conditions.
* Reduce scope of local variables when possible

Change-Id: Ibacd13126351019af544f3e22513654d5ffee342
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-11-03 08:33:45 +01:00
Torbjörn Svensson
2857a7a0b3 Bug 568079: Do not require rebuild of natives to enable/disable tracing
Change-Id: I6e26c6febd56bcc23efe0ec65973b2f02a5fd809
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-11-03 08:33:45 +01:00
Torbjörn Svensson
6431307e70 Bug 568079: Reformat source code using clang-format
This will enforce formatting when building the native code

Change-Id: I6c047f4c0672609df322b7ba716fc786f0e3aab4
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-10-31 20:13:42 -04:00
Torbjörn Svensson
7f10dce12f Bug 568079: Remove unneded DllMain (does nothing)
Change-Id: Ib4489c6bcde43c6299550ec57c632bf666bcac6f
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-10-31 20:24:52 +01:00
Torbjörn Svensson
908aa33b91 Bug 568079: Activate -Wall -pedantic and fix warnings
Change-Id: I7dac7f9d90dd65cfbff241f9b778bc5ff6bc9db6
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-10-31 20:24:44 +01:00
Torbjörn Svensson
570c5b7ff0 Bug 568079: No need to check for NULL before free()
Change-Id: I4948ce07ed4ec426ce2a3bac226281409c25f7c9
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-10-31 20:24:44 +01:00
Torbjörn Svensson
3ae7b88630 Bug 568079: Add missing bracers
Change-Id: Icd916d224d4900cf2227f868f8b94cdae13c3f6b
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-10-31 20:24:44 +01:00
Torbjörn Svensson
82bc0b67e5 Bug 568079: Removed generate method comment from implementation
The comment is part of the generated header file

Change-Id: Ie890ad4d906c0f4e6a23b2a42a1ef342d1da8865
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-10-31 20:24:35 +01:00
Torbjörn Svensson
c5a53bb7fe Bug 568079: Format C/C++ code
Added a new C/C++ formatter profile called "Unmanaged profile 'CDT'"
(name stolen from the Java formatter) that is basically K&R with the
tweak of maxium line width set to 120 (same width as for .java files).

Added enforcement of the formatter during build.

libspawner.so/jnilib have differences because the re-formatting changes
line numbers and therefore the __LINE__ macro expands to a different
value.

Change-Id: Id3a0619cb31640c7817dc684c72139f90cab0fc6
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-10-24 16:54:40 -04:00
Marc-Andre Laperle
6ca0bb78bb Bug 329995 - Update all C/C++ views when the active configuration changes
Change the default workspace indexer setting

Use the active configuration by default, which is less confusing because
the UI is properly reflected on active config change.  Using a fixed
config can be seen as a more advanced setting for performance concerns.

A new preference is added, only used at default scope:
org.eclipse.cdt.core/cprojectdescription.configRelations
This can be used by products to customize the default according
to their needs (plugin_customization.ini).
This was done because this is a fairly impactful change for users.

Change-Id: I35888ffe5bc1814943f432f88a12094394924c88
Signed-off-by: Alex Freidin <freidin.alex@gmail.com>
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2020-10-20 22:59:41 -04:00
Marc-Andre Laperle
cebba80b36 Bug 567822 - [Dark Theme] Several controls using ControlFactory have wrong background (preferences, dialogs)
I don't think "inheriting" by hand the background colors is supposed to
be done like this. Removing the lines setting the background to be the
same as the parent fixes the issue. I also verified all places in the UI
before/after the change.

Change-Id: I2eb4cc5afdd303d5d5613fc3d50d67d0c18c7028
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2020-10-19 23:26:17 -04:00
Marc-Andre Laperle
bc76b0a7c3 Bug 567778 - [Include Browser] Cannot open the Include Browser on file outside source folder
CoreModelUtil.findTranslationUnit only returns CElement in the populated
CModel of a project. This shouldn't change as a large majority of client
code need to see the model this way and not consider files that are
outside source folders. So for a file not under a source folder (and
therefore not in the CModel), we can just create a new translation unit
instance for it. This is actually how the editor deals with it too.

Change-Id: I8898822e94cac8562edcc0a726fdd8680119faca
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2020-10-12 12:15:43 -04:00