1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00
Commit graph

14446 commits

Author SHA1 Message Date
Marc-Andre Laperle
cf9922cd2f Increase PDOM version to force rebuild for bug 549028
Change-Id: If18da2b194515c64351ed61b149593566afbc7d8
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2019-07-11 00:20:44 -04:00
Nathan Ridge
1ea6dac9af Bug 549078 - ArrayOutOfBoundsException in AbstractIndexerTask.IndexFileContent.merge()
Change-Id: I7ceacfc9c14e10bdecf7dda3c793a3ed26559bc2
2019-07-11 00:00:06 -04:00
Marc-Andre Laperle
76b7b64307 Bug 549028 - Fix missing getRecordSize() leading to index corruption
Because of the missing getRecordSize implementations, subclasses would
starting writing in records that were thought to be malloc'ed by
the parent but it was instead writing in other blocks, possible used
by other PDOM objects or free blocks to be used later and now not initialized
to 0.

This could lead to a few different exceptions like
- BufferUnderflowException(Chunk.getChars)
- CoreException: Corrupted database
- ArrayIndexOutOfBoundsException(AbstractIndexerTask$IndexFileContent.merge)
and possibly others.

Change-Id: Ie6d1986a22a9fb5f5e90cb741046d098ebf10a90
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2019-07-10 21:52:38 -04:00
Marco Stornelli
cd627b0a49 Bug 540001 - Added option to control comments formatting
Change-Id: I97b1813113f2c53a549b5be7d91ff834fce86bd5
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-07-07 09:37:23 +02:00
Doug Schaefer
b953649c09 Bug 548980 - Track launch target connects and add error builds
We need a way to alert the user that we are unable to find a toolchain
that maps to the current target. An ErrorBuildConfiguration is created
that simply prints out an error message at build time to handle this.
We then set one of these as the active build config in the tracker
with the appropriate message.

We also add a target listener so that when a target becomes OK_STATUS,
we run the tracker again to see if we have the right active build
config for that target. Some targets can only determine some of their
attributes when connected.

Hook up the IToolChain matches so we're using it in the toolchain
manager. This allows toolchains to do more complicated matching of
the properties.

Change-Id: Icaff85117e8147cd2793f2915fa75ce33673ab52
2019-07-05 10:43:56 -04:00
Marc-Andre Laperle
dee22911a5 MSVC: Add some type-traits supported by MSVC in the scanner configuration
Add existing type-traits that were implemented for GCC that are relevant to
MSVC. Some are missing but even with those parsing is improved with minimal
effort. For the LLVM codebase, I see it go from 0.46% unresolved names (16,668)
to 0.19% (6,950).
This is combined with another patch that adds temporary macro hacks.

Change-Id: I441dcfa4a986edef78b75c0d6db04b78fdbc97b3
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2019-07-04 00:51:22 -04:00
Nathan Ridge
96bbd4b7a8 Bug 548954 - Type transformation specifier in type-id
Change-Id: Ia8e0aaf7814cb104d296ae20cc5f43fd2ddd0792
2019-07-03 23:02:35 -04:00
Nathan Ridge
fe003c3b8f Bug 548700 - Handle prefix negative sign in FloatingPointValue.parseDouble()
While a literal expression itself will never be negative (the negative
sign is parsed as a unary operator), we also use FloatingPointValue to
represent results during value computations which can be negative.

Change-Id: I16227b2d19256066b094ae60476e124b4bcea14d
2019-07-02 15:20:42 -04:00
Marco Stornelli
35a1923321 Bug 467346 - Fix format structs/unions with attributes
Change-Id: I516c53978c7dea0191fc66d2820e1dbe5a664b48
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-07-01 17:57:48 +02:00
Nathan Ridge
451fa86e35 Bug 467346 - Retain attribute after struct key in C
Change-Id: I35a25bc635039c37b66d1f1e4037e943ffcb0d39
2019-06-29 02:44:22 -04:00
Felix Morgner
996d7193c0 Bug 488349 - Organize Includes removes an include necessary for a...
Add missing ; to test case.

Change-Id: If0224c4fc3580cbe527efe0d3a5739896a000d7e
Signed-off-by: Felix Morgner <fmorgner@hsr.ch>
Signed-off-by: Thomas Corbat <tcorbat@hsr.ch>
2019-06-28 04:03:49 -04:00
Thomas Corbat
acb5ab5105 Bug 548712 - MinGW installation is not recognized
Recognize MinGW installations by checking the path of gcc.exe for
substring "ming".


Change-Id: Ibc6d4b03ef715036176e3aea6382dd986e4caae8
Signed-off-by: Thomas Corbat <tcorbat@hsr.ch>
2019-06-28 02:15:49 -04:00
Hansruedi Patzen
9fe8978817 Bug 548512: Declarator formatting multiple keywords between pointers
Bugfix and removal of code duplication.

Change-Id: Id6a94c4cf59311f287b73e09019ddd323361fdc7
Signed-off-by: Hansruedi Patzen <hansruedi.patzen@hsr.ch>
2019-06-25 18:32:23 +02:00
Nathan Ridge
e435167a1a Bug 548482 - Return non-null from CPPFunctionProblem.getType()
This avoids an NPE as callers of IFunction.getType() do not expect it
to return null.

Change-Id: Ice90fa358c25007dffb41217c5a38d6c2f4a9d0e
2019-06-25 00:01:37 -04:00
Nathan Ridge
f65e93596e Bug 548482 - Add CPPClassSpecialization.RecursionResolvingConstructor
This avoids an ArrayStoreException in specializeMembers().

Change-Id: I88a92462ef1ace4e99a0b45a9ba5975c705dab67
2019-06-24 19:09:32 -04:00
Jonah Graham
6b435e1faf Bug 547763 - Bump patch version for previous change
Fixup for commit 141142dcab

Change-Id: I7be9eb1021eb611c7103aff7ea85fcdc3f5f1a87
2019-06-24 12:49:32 -04:00
Nathan Ridge
141142dcab Bug 547763 - Consistently handle IArrayType.getSize() returning a null IValue
Change-Id: I0246f1af5f3ed16f6ab03ff30dd9a0b27ee37df6
2019-06-21 14:44:18 -04:00
Mat Booth
d07a2c5bf6 Remove remnants of no longer supported arches
Change-Id: I9fb7caf1345dff8dd33964bf62f1bc1b513fa8b3
Signed-off-by: Mat Booth <mat.booth@redhat.com>
2019-06-19 16:10:21 -04:00
Jonah Graham
8e0ba58fa8 Bug 548334: Remove unused NLS message with no entry
This was causing:
Warning: NLS missing message: OverrideMethods_label in: org.eclipse.cdt.ui.refactoring.actions.Messages

Change-Id: I07e16ec58397fa268a06dcdba30dccfa1e66a93e
2019-06-17 07:59:54 -04:00
Marco Stornelli
0b9b9890ee Bug 548138 - Fix override method with implementation
Change-Id: Icbea4fe97e8f3b481ea187f905661c8adcc7cc06
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-06-11 15:15:29 -04:00
Jonah Graham
f3e8387a8e [releng] Bump version to 9.9.0
Change-Id: I6641e51a8bfdb44fa5c646d97debf2bf814c107a
2019-06-11 12:33:48 -04:00
Jonah Graham
9698af0fc6 [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

Change-Id: I1c8f102a9a750e40970197da3e6cd56d139492bc
2019-05-31 16:53:15 -04:00
Marco Stornelli
862e8222ea Bug 547684 - Fix format assignment with init list
Change-Id: I4fbdc1c65eb25688231e8020bbc3baa750d97be0
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-31 01:00:07 -04:00
Marco Stornelli
353315f84a Bug 303870 - Fix for base template classes
Methods weren't added if the virtual methods were in a base
template class.

Change-Id: I34b05eeb1e7dc5ce83944a642461eca521764967
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-30 01:07:38 -04:00
Marco Stornelli
a009b41021 Bug 268404 - Added options for label formatting
Change-Id: I192ede1c17d2b1929dcb6fb33158eb7628707598
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-28 01:11:55 -04:00
Hannes Vogt
dc62eb218d Bug 547534 - Resolve TDEF in getFieldPosition()
and propagate a ProblemType in EvalCompositeAccess.

Change-Id: I20c580c681ea5916d2e1c249b96f41c9dc95082f
Signed-off-by: Hannes Vogt <hannes@havogt.de>
2019-05-27 20:56:02 +02:00
Nathan Ridge
9e4c36a7ab Bug 547533 - Avoid ClassCastException in EvalTypeId.getValue()
Change-Id: I614b67a7b53b7075b702911a33ba8440a187614e
2019-05-26 19:29:57 -04:00
Marco Stornelli
0c147ecb93 Bug 547450 - Options default/delete/inline/definition
It's now possible to select among four options for the
implementation of single method stub: delete, default, inline
or definition.

Change-Id: I9aac9c53a5a7143235d0f2f447b8d22fa2e2c839
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-24 14:39:49 -04:00
Jonah Graham
f98add0056 Fixes for Test Leaking Editor test
The testLeakingInstanceAfterClose test relied on some weird
behaviour of an earlier test (testScalabilityDialogNotDismissedInadvertently_417909)
which had the effect of opening the editor window without the
welcome screen. This change makes that explicit and adds a little
bit of logging to identify why the testLeakingInstanceAfterClose
test may sometimes fail.

I have also increased the maximum time allowed before the test timesout.

Change-Id: I3433ccf1fc02cff76eeb278d05fee082157ca49c
2019-05-22 14:14:15 -04:00
Nathan Ridge
8e1059c5b8 Bug 547224 - Avoid concurrent access to AST type string caches
The caches used to be thread-local, but that did not survive the
refactoring in bug 512297. This patch makes them thread-local again.

Change-Id: Iffe37aef292e4efb05e30af2a251a71fb57b343d
2019-05-21 13:00:15 -04:00
Davin McCall
2734b7ae82 Bug 545040 - make array size inference work with initializer lists
Resolution for DR1591 clarified that initializer list size could be used
to deduce array size (if it is a template parameter).

Change-Id: Ic3617e31b125083f1205f91383eb27f5e5a29041
Signed-off-by: Davin McCall <davmac@davmac.org>
2019-05-21 12:59:00 -04:00
Hannes Vogt
1cd0e1df35 Bug 546805 - Infinite recursion in self-aggregation
Protects for infinite recursion in case the type (illegally) aggregates itself.

Change-Id: I2e70f85a73b3d2ed6fec432fa2f768f2bcf8d1bf
Signed-off-by: Hannes Vogt <hannes@havogt.de>
2019-05-20 20:49:26 +02:00
Hannes Vogt
f938b4d08e Bug 545021 - Implement noexcept operator
- Adds getNoexceptSpecifier() to ICPPFunctionType, returning the
evaluation for the noexcept specifier.
- Adds isNoexcept() to ICPPEvaluation, which returns the result of
applying the noexcept operator to the evaluation.
- Empty throw() specifier is treated as noexcept(true).
- Improves EvalTypeID.isConstantExpression() for conversions.

Change-Id: I4c6418aea21bb258693b33d956bc3745918f3759
Signed-off-by: Hannes Vogt <hannes@havogt.de>
2019-05-20 02:47:27 -04:00
Marco Stornelli
0552fcbf97 Bug 500000 - Fix API warnings
Change-Id: Ia99ccbffc3cbe361e7ce2bca05b604ece8255e8b
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-18 07:23:10 -04:00
Marco Stornelli
1cd5180642 Bug 353022 - Fix format switch without parenthesis
Change-Id: I8d8a6498abe5c08c65c03f86b563563910f01098
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-18 02:15:26 -04:00
Jeff Johnston
74e63a9013 Bug 547174 - Clean core project doesn't always show active in console
- add missing ProjectDescription.setBuildConfigs calls to
  CoreBuildLaunchBarTracker, CoreBuildLaunchConfigDelegate
  and CBuildConfiguration

Change-Id: I0d1097d04f3a210a6a7e9f8ad35adb9ba5d7c3d6
2019-05-16 16:46:02 -04:00
Marco Stornelli
dffd0d1513 Bug 500000 - Fix API warning
Change-Id: I520dccda37fd7bf675abbf3230de1d8a01307588
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-16 15:22:31 -04:00
Jeff Johnston
4028d882fe Bug 547398 - Fix ConcurrentModificationException in ToolChainManager
- fix references of orderedToolChains list in for loops to use
  array copy

Change-Id: Id6ad9ae5e680ed581a2b3ceddf2bfc19b68dcccd
2019-05-16 15:19:42 -04:00
Marco Stornelli
bdb0da6b73 Bug 120883 - Compliant "rule of 5" class wizard
Added the optional generation of copy constructor, move
constructor, assignment operator and move assignment operator.

Change-Id: I1fc0a04fd52ea828ca24d0fe57148b06dd27ed95
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-16 13:42:24 -04:00
Jeff Johnston
86bfd4de7e Bug 547174 - Clean core project doesn't always show active in console
- order build config names so when clean for a project goes through
  the build configs, it finds the active one last and thus it will
  appear in the CDT build console
- do this in CoreBuildLaunchbarTracker.setActiveBuildConfig()
- do this in CBuildConfiguration.setActive()
- do this in CoreBuildLaunchConfigDelegate.buildForLaunch()

Change-Id: I379d6c9ba298f02cbc75d16e9941527cd2f9f45c
2019-05-15 20:41:14 -04:00
Jeff Johnston
949dd8a45f Bug 547144 - Switching from Local to docker container and back fails
- fix CBuildConfigurationManager createBuildConfiguration to always
  ensure "" is added to the build configuration names so future references
  to Local will find the default build configuration in the
  ProjectDescription

Change-Id: If15dde12befe060b4eb7c0ba2a2aeabbc1089ffa
2019-05-15 17:51:07 -04:00
Jeff Johnston
19e4eabff2 Bug 547145 - Core build use of ProjectDescription should be synchronized
- synchronized core build project description
  manipulations using CoreModel as synchronization
  class

Change-Id: Ic1312d5819ddc08acb492f57a2d87f1998329805
2019-05-15 16:05:29 -04:00
Marco Stornelli
38a084ce6d Bug 500000 - Added proper formatting for lambda expressions
Change-Id: Ia530b00f3710b74d1749978c9c5d23a2d55646f0
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-15 13:49:05 -04:00
Clément Hurlin
f89d6e51bc Fix API rules errors caused by updating target platform to
Eclipse-2019-06

Change-Id: I7270399ae6dc55d13ffd5986f41c5f6fe03781f1
Signed-off-by: Clément Hurlin <clement.hurlin@provenrun.com>
2019-05-13 16:23:37 +02:00
Marco Stornelli
f893b77dba Bug 461435 - Added options to format pointers in methods
Rules used:
1) Default is right alignment to be compliant with built-in formatter
rules;
2) Pointer with declarator without name will be always left alignment
unless there's a nested declarator;
3) Return value of methods/functions is always left alignment;
4) If left alignment is selected, if space after comma is selected too
for a declaration list, space is always forced after the comma.

Change-Id: I82d5ad130e665e5357644cc59655a558f3fb732f
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-12 15:42:21 +02:00
Marco Stornelli
826a0b2c0e Bug 405409 - Formatting namespaces with inactive sections
Local scanner was peeking tokens from inactive regions confusing
the formatter.

Change-Id: I5975ec1042474be84b897e047a1e59cfc8bfa083
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-12 14:54:29 +02:00
Marco Stornelli
62617729fa Bug 239878 - Added new line before identifier to the UI
The option was already used but there wasn't any widget in the UI
to let user change it.

Change-Id: Ib8795468cc83b89bb3ef9676a5e0ed3f288d55da
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-08 20:27:22 +02:00
Marco Stornelli
5b869afec3 Bug 390324 - Fix cast operator containing func declarator
Change-Id: I935fe1daabd18372062916e5a896896f5cab604f
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-08 19:30:49 +02:00
Marco Stornelli
bf0b7a76ed Bug 546221 - Fix exception for nested namespaces
Change-Id: I6de8844a910350a0e834a8f38e1c17d4eba32842
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-08 01:20:23 -04:00
Hannes Vogt
665f47395e Bug 546843 - Initialization from dependent argument
Create deferred functions for constructor calls with dependent
arguments.

Change-Id: I007dd4fd12c13acdcb39225b73051589f6dafad3
Signed-off-by: Hannes Vogt <hannes@havogt.de>
2019-05-05 18:54:25 -04:00