1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 06:32:10 +02:00
Commit graph

14020 commits

Author SHA1 Message Date
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
Hannes Vogt
53187c30c5 Bug 545756 - Fix aggregate init from string literal
Fix nested type for typedefs

Change-Id: Ie8ff31c9db9f3112487760640885066ea8cb0fd3
Signed-off-by: Hannes Vogt <hannes@havogt.de>
2019-04-29 21:56:53 +02:00
Marc-Andre Laperle
32ba5e791d Bug 546395 - Adjust keybinding for "copy qualified name" feature
Fix keybinding so that is doesn't conflict with "Last edit location"

Change-Id: I75ab9ad4a46e64808cbe4f71dfa95f75fc20780e
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2019-04-28 12:30:31 -04:00
Marco Stornelli
6be494466b Bug 303870 - Add override virtual methods functionality
Added overridemethods package

Change-Id: I73a8f0a396336acf7d3bbc8988e629da510ae781
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
Signed-off-by: pmarek <pavel.akira.marek@gmail.com>
2019-04-28 08:12:04 +02:00
Jeff Johnston
5edac6e20c Bug 546395 - Added "copy qualified name" feature
- fix isValidSelection() to not bog down performance

Change-Id: I8d3b595c988f09c731d76b8174f5175b31115460
2019-04-26 13:45:44 -04:00
Marco Stornelli
fc25433621 Bug 546395 - Added "copy qualified name" feature
Change-Id: I66b544cf7d9b05fcf1e9d5641cfd5d6060fa802c
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-04-24 22:32:28 -04:00
Hannes Vogt
bf9575d365 Bug 546619 - NPE in CPPClosureType.isSameType()
Change-Id: I0a529f439c1422b89a9c5fca855c2c75818f9927
Signed-off-by: Hannes Vogt <hannes@havogt.de>
2019-04-21 23:30:14 -04:00
Hannes Vogt
11a14b7ed3 Bug 545756 - Improve EvalBinding.isConstantExpression()
Previously, all variables with an initial value (even non-const)
were treated as constant expressions, now only constexpr variables,
static const members and global const variables are treated as constant expression.

Change-Id: I2acb4033a1f75110302ea25640afb070d025ec2b
Signed-off-by: Hannes Vogt <hannes@havogt.de>
2019-04-19 17:39:30 -04:00
Felix Morgner
480af1ddb1 Bug 544818: Unparenthesized conditional expressions in trailing return
type causes parse error

Change-Id: I55131a2f1b6c6eec674f4f298b320d31a78d2829
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=544818
Signed-off-by: Felix Morgner <fmorgner@hsr.ch>
2019-04-16 14:34:24 +02:00
Marco Stornelli
ef2468b390 Bug 546391 - Fix on/off tags
Change-Id: If23ac8f7777c5088b892a31a543741c244dd1a4a
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-04-13 14:28:30 -04:00
Marco Stornelli
ce60ebbbf6 Bug 397710 - Fix bool macro used in struct/class
Change-Id: Ifc900b4b5f522ce778c49072eb9ceac7be9234ed
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-04-10 10:36:29 -04:00
Marco Stornelli
290cb246b6 Bug 449394 - Fix constructor init list formatting
Init list was always on new lines regardless user input about new line
policy or wrapping policy.

Change-Id: I1ac85611129c23e89d9b299ca87ced314ad542f3
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-04-09 16:21:20 -04:00
Tomasz Rojek
5131b86d9a Bug 468206 - unable to change search match background color
Search background color will be now taken from:
Preferences > General > Appearance > Color and Fonts > Match highlight
background color
so it will look good on both default and dark theme.

Change-Id: I2800b6cd3ac651cda577cc533149f0ead0fa75f3
Signed-off-by: Tomasz Rojek <me@tomrosystems.com>
2019-04-08 15:53:18 -04:00
Marco Stornelli
e93ea0ab70 Bug 468206 - Fix color for search matching
We used color keys not saved in the preferences and without any UI
widget. The user wasn't able to change them.

Change-Id: I48bc4e411d2bc016501613b7dbfb0e7f95532099
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-04-08 13:49:15 -04:00
Marco Stornelli
e753c628ed Bug 414681 - Added new line empty statement to UI
Formatter has an option for it but the user can't change it
without an option in the UI.

Change-Id: Ibe3f36bd55b24ef06c13300792e425592285c8ea
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-04-08 12:58:53 -04:00
Marco Stornelli
d1bd979a00 Bug 361768 - Fix formatting of multiple empty macros
Change-Id: I9ba68533ce65de3309eb8d2186b2488985f457d2
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-04-08 12:52:36 -04:00
Marco Stornelli
280c0190d2 Bug 453385 - Fix for loop formatting
When "before semicolon" was selected the space was inserted only
if the init clause was a declaration. If it was an expression
the formatter was skipped.

Change-Id: I54605591b9a0829338dadb51e59460064b060697
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-04-08 12:51:41 -04:00
Marco Stornelli
70743bcc78 Bug 475349 - Formatting of macro with function style
Change-Id: I58f5670749812202464f17336b273b7d1495209f
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-04-05 17:28:11 -04:00
Marco Stornelli
eff560c583 Bug 299482 - New options to format linkage declarations
Change-Id: Ied06beae3fc28255e2c1b6ba8b23fd69591e3d39
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-04-05 10:46:32 -04:00
Marco Stornelli
670f056354 Bug 467346 - Fix formatting structs with attributes
Change-Id: Iff1be840ec6281bd0de1aaec593d53a033f6dec8
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-04-04 16:26:54 -04:00
Nathan Ridge
c39ddef02f Bug 545756 - Handle the case where CPPVisitor.get_SIZE_T() returns a typedef
Change-Id: Ib30c68c4d7de72d9a6cb2a90b9030aaad4932e6f
2019-04-03 23:24:38 -04:00
Jeff Johnston
5bd43cf304 Bug 545819 - Meson properties dialog doesn't work with meson 0.50.1
- fix meson properties page to use meson setup -h
- reenable meson ui tests
- fix CMake New Project test to wait for shell open/closes
- fix regression in EvalUnaryTypeID that is made visible by
  CMake New project test

Change-Id: Id64d4df6d9764d0c84553b5c4f73fa44149bda19
2019-04-03 10:20:28 -04:00
Hannes Vogt
d9550199f8 Bug 545756 - Aggregate: init char array from literal
Implement [dcl.init.string] in aggregate initialization

Change-Id: Ib6cf51cf08885dbfc281814c6521da3579301492
Signed-off-by: Hannes Vogt <hannes@havogt.de>
2019-04-02 08:08:41 +02:00
Hannes Vogt
c2779e8d3e Bug 545957 - Fix for brace elision rule
Change-Id: Ie470c1d9a986beb1b177e3d3d571071f6ed1b8f8
Signed-off-by: Hannes Vogt <hannes@havogt.de>
2019-03-30 19:10:09 -04:00
Nathan Ridge
fc45110844 Reduce template argument nesting depth limit
AST2TemplateTests.testTemplateArgumentNestingDepthLimit_512297() is
failing in the new CI infrastructure, presumably due to having less
stack space?

Change-Id: I05a67cc1492fed3ffe8840e32a1bc4ce7f6b75a7
2019-03-30 18:03:32 -04:00
Hannes Vogt
3a95ee0655 Bug 545756 - Fix initialization of constant expressions
- propagate associatedNumericalValue in sizeof()
- set associatedNumericalValue from LiteralExpression

Change-Id: Ibf1fdb70e7bbbb889113f337a0b12532c5040300
Signed-off-by: Hannes Vogt <hannes@havogt.de>
2019-03-30 17:10:48 -04:00
Nathan Ridge
2cdbc5ebb6 Bug 545751 - NPE in EvalTypeId.getValue()
Change-Id: Ia11dc1a8af6633ffe54ca927c68bf8dc837604a0
2019-03-26 02:07:31 -04:00