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

13769 commits

Author SHA1 Message Date
Alexander Kurtakov
832f8d3d9d Add missing annotations.
Change-Id: I62df355cd6b85a9cbedd467def188eed2f4222e1
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2018-02-09 09:23:17 +02:00
Alexander Kurtakov
db1cd491d6 Remove useless imports.
Change-Id: Ie59d3942ea1df97440bd84e46a24753ed6ed429b
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2018-02-08 21:17:09 +02:00
Alexander Kurtakov
12681f7807 Remove unnecessary suppress warnings.
Change-Id: I1c3de215d9c4f488309f53eaa4a90a32210994be
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2018-02-08 13:03:22 -05:00
Mat Booth
b50ba14831 Bug 530620 - Hook build of native serial port driver into maven build
In the same vein as commit dff6b3bae3, this commit adds profiles
to trigger the build of the serial port component for the current
architecture, only when the profile is activated.

The serial port makefile is also improved to support building for
ppc64 and ppc64le architectures and to honour CFLAGS and LDFLAGS
that might be set in the environment, such as during RPM build.

I also hooked in the makefile "clean" targets so that invoking
"mvn clean verify" will do the right thing.

This simplifies the build for downstreams building from source
significantly.

Change-Id: Ie8cea95d953b256a1f62b77c76370ed7b3d81cee
Signed-off-by: Mat Booth <mat.booth@redhat.com>
2018-02-08 11:41:27 -05:00
Jeff Johnston
e8f619c344 Bug 529121 - "Build target" has stopped working in CDT 9.4.0
- default environment using EnvironmentReader in
  CommandLauncherWrapper class in CommandLauncherManager
  if no environment set for wrapper to match behaviour
  of CommandLauncher

Change-Id: I71ff37b3d8f2049dc705e97bf28f939ac78bd390
2018-02-02 17:05:30 -05:00
Jeff Johnston
1ae547908b Fix some API issues caused by some recent CommandLauncher additions
- remove new exposed field from CommandLauncherManager and
  add correct @since tags
- create new ICommandLauncherFactory2 interface so that no
  additions are made to ICommandLauncherFactory
- add @since tag for ICBuildCommandLauncher interface
- make ContainerCommandLauncherFactory implement the new
  ICommandLauncherFactory2 as well as ICommandLauncherFactory

Change-Id: I7bbacb59e284b43e6d142accf59b6ab9df274438
2018-02-02 14:41:18 -05:00
Nathan Ridge
f6b60ed850 Bug 530430 - Proper handling of class initially declared as a friend
When a subsequent regular (non-friend) declaration of such a class
is indexed, the index binding needs to be marked as being fully
visible to name lookup.

Change-Id: I1a625f93eda1af257a9af50b5c4f115fc9bf6526
2018-01-31 13:09:31 -05:00
Jeff Johnston
55fb64151b Bug 530468 - Support passing CBuildConfiguration to Cmd Launcher Factory
- add new ICBuildCommandLauncher interface
- add new defaulted method to ICommandLauncherFactory interface
- add code to look at Build Configuration properties in
  ContainerCommandLauncherFactory
- add new methods to CommandLauncherManager and
  ContainerCommandLauncher
- add an update dialog call in ContainerTab
- add calls to set and get CBuildConfiguration to
  ContainerCommandLauncher

Change-Id: If95fafe592c7ea4580bae1a15d168d1163e132fd
2018-01-29 16:14:18 -05:00
Nathan Ridge
1d9e549ae7 Bug 530086 - Instantiation of template argument where substituted argument is a pack expansion
The first patch for bug 527697 made us not instantiate such an
argument, because determinePackSize() would return PACK_SIZE_DEFER.

The motivation for that fix was to avoid sizeof...(T) prematurely
instantiating to a concrete value in cases where T was mapped to
a pack expansion.

This patch reverts the change to determinePackSize() and applies a
different fix for the sizeof...(T), specific to EvalUnaryTypeId.

Change-Id: Idc231aeecb5d50e93dda364c6d2deb08057cc8b6
2018-01-28 18:37:12 -05:00
Nathan Ridge
5f9964098c Bug 530086 - Consider pack expansions when matching non-type arguments to parameters during instantiation
Alias templates can be instantiated with dependent arguments.

Change-Id: I123ee574ed2eecb09b551360a0bbc966893d9e34
2018-01-28 03:37:03 -05:00
Jonah Graham
b15619d4b1 Bug 530374: Update API Baseline post 9.4 release
Change-Id: Iafc6f8f754475ca77e3d22b848f3a801b2e80edc
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
2018-01-26 13:29:58 +00:00
Nathan Ridge
f413c21d03 Bug 490359 - Add support for C++17 nested namespace definitions
Change-Id: I5f2550e607195335475427f6fced63bf97eaa718
2018-01-25 17:32:58 -05:00
Nathan Ridge
69c84d4f05 Bug 529958 - Semantic highlighting of variable passed by non-const reference in a dependent call
Change-Id: I421bf98cbeff052c39716f1381e9f8930626318b
2018-01-25 17:02:52 -05:00
Nathan Ridge
a4599f7c36 Bug 529696 - Propagate the template-id strategy into names contained within a type template argument
This avoids expontential complexity when type template arguments inside
an ambiguous name specifier themselves contain ambiguous name specifiers.

The patch also enhances TemplateIdStrategy to allow marking and backing
up to a branch point, and uses this ability in templateArgument().

Change-Id: Ia03e9cd0bc026b02b85edc05ed327cce883d6a59
2018-01-18 12:41:47 -05:00
Nathan Ridge
88da6c08bb Bug 529646 - Avoid computing the value of static fields for every object of a class type
Change-Id: Ic07a1fe5c84b67ed4a9be5e2d50beb9d5c1a54af
2018-01-17 13:21:19 -05:00
Jeff Johnston
d822d7ce16 Bug 529799 - problem with entries tree in LanguageSettingsEntriesTab
- fix provided by Christian Walther
- fix createTreeForEntries() method to use addTreeListener() instead
  of addPaintListener() to handle resizing
- in TreeListener, define treeExpanded method which uses pack method
  for entries column

Change-Id: I28db2059d3e0561ce9e5e52f569409de9aff9a6d
2018-01-16 16:17:52 -05:00
Nathan Ridge
2b7188c9a5 Bug 529337 - NPE in PDOMCPPLinkage.onCreateNameHelper()
Change-Id: I4fc9ce82b0960dfc0a69044f9c2b3d1edb3d4622
2018-01-10 00:04:19 -05:00
Simeon Andreev
92bc379917 Bug 529023 - Cannot set build.proj.ref.configs.enabled via customization
The setting build.proj.ref.configs.enabled=true ensures CDT projects are
not rebuilt if non-related projects are changed. This setting cannot be
changed with product or command line customization, hindering products
which require this behavior.

The reason for this is that ACBuilder, which is asked for the value of
the preference, communicates with the instance scope of preferences.
Product and command line customization, however, are on default scope
level.

With this change, ACBuilder will also ask the default scope when
retrieving the value of the preference.

Change-Id: I09e895ea2a05b677e36fac9eb28f24f1f3bc2877
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
2018-01-08 10:55:37 -05:00
Davin McCall
fc053e6124 Bugs 529299 and 491296. Fix indentation after 'noexcept'/'override'.
Change-Id: I3129e5f9fced4a27020f6ca27238bf5faf4df889
Signed-off-by: Davin McCall <davmac@davmac.org>
2018-01-03 15:39:11 -05:00
Nathan Ridge
1213755167 Bug 517670 - Handle instantiation of closure types
Change-Id: I82208dbb2ec0e11760cbd78a073acefa627d8d36
2017-12-31 00:18:29 -05:00
Nathan Ridge
a8ff78b531 Bug 528457 - Store lambda parameters in index
The special binding type CPPLambdaExpressionParameter is removed.
Instead, a lambda expression parameters's are represented as
regular CPPParameters owned by the closure type's generated
function call operator.

Change-Id: I4afeac90c2595a1f84dfa59f057d0494b64d079c
2017-12-31 00:17:07 -05:00
Nathan Ridge
89ec7fe8b8 Bug 528846 - Handle id-expression that instantiates to pseudo-destructor name of built-in type
The pseudo-destructor is represented as a CPPImplicitFunction, computed
lazily and stored by CPPBasicType.

This commit also adds support for alias templates to
CPPTemplates.getTemplateName().

Change-Id: I6774556b2493cb68d32c3007d6ce48c7805595f4
2017-12-24 11:38:49 -05:00
Hansruedi Patzen
3e66e22aed Bug 527844: ExpressionWriter does not write IASTLiteralExpression suffix
Change-Id: I4dbca527a16c698d7f1a16f2a6a0eca2e6cdc77a
Signed-off-by: Hansruedi Patzen <hansruedi.patzen@hsr.ch>
2017-12-21 12:52:04 -05:00
Nathan Ridge
86c3d8eeca Bug 525739 - Have Open Declaration find potentially-matching definitions for a declaration
The implementation strategy is as follows:

  - Implement an option to find potential matches during an AST
    definition search.

  - Store names that resolve to ProblemBindings in the index,
    as references for the candidate bindings, annotated as being
    potential matches.

  - Add an option to Index.findNames() to include potential matches.

  - Use the added options for the index and AST searches in
    OpenDeclarationsJob, prioritizing them accordingly (e.g. exact index
    matches take precedence over potential AST matches, but if there
    are no exact matches, potential matches from the AST and the index
    are combined).

Change-Id: I19f5c58820eb3ec79a31652d69fd5b86acaba115
2017-12-20 16:01:24 -05:00
Nathan Ridge
be77fcf544 Bug 528456 - Store specializations of anonymous classes in the index
Change-Id: I9772df1430c239bd7144fdd5a2512b7a2fd3fca4
2017-12-20 15:09:30 -05:00
Hansruedi Patzen
89820bf95d Bug 528196: Ignore cv qualifier for UDL operator lookup
Change-Id: If8567c96d8dedfbc4b5ffd7e67db074f1fe48ca2
Signed-off-by: Hansruedi Patzen <hansruedi.patzen@hsr.ch>
2017-12-14 02:23:22 -05:00
Nathan Ridge
b07df3a4fc Bug 527697 - Attempt deduction with all base classes of an argument type
Previously, we would only try the first base class whose primary
template matched that of the parameter type.

Change-Id: I0511e6a1ba1c7197887ff23bc37b70a2a820eb87
2017-12-14 02:19:59 -05:00
Nathan Ridge
e2c5592d9d Bug 528124 - NPE in CCOdeFormatter.findOverlappingPreprocessorStatement()
Change-Id: I4669d4938551506d7a06624b4318253cc4ecc643
2017-12-11 22:38:42 -05:00
Nathan Ridge
f8b30717ce Bug 528072 - Implement evaluation of __is_trivially_constructible
Change-Id: I331ea5c2f5203a87290d4ef537a8a75dab384c34
2017-12-11 22:36:41 -05:00
Nathan Ridge
ccfad7cf58 Bug 527961 - Add missing GCC builtins __builtin_object_size() and __builtin_ia32_shufpd()
Change-Id: I3ab96a24a8f45f3478dcdc07eef0d60029922ae9
2017-12-02 17:09:29 -05:00
Doug Schaefer
d6a1c13e5c Cleanup Core Build Preference pages.
Move Toolchains directly under C/C++ and rename to Core
Build Toolchains. Add a label describing what the toolchains
are for in hope of avoiding confusion with managed build.
Also move Qt into C/C++.

Change-Id: Ia1d76087c65b26562d1001243ea355c7ac32365e
2017-12-01 14:04:51 -05:00
Nathan Ridge
193cb87bfa Bug 527697 - Size of parameter pack where arguments themselves contain a pack
Change-Id: I850eaf74a3fb3ec4b160aedc3f594ff0d0edf31a
2017-12-01 11:31:09 -05:00
Martin Oberhuber
abf1b13e6b Bug 527959 - Fix argument lists for some builtins
- Add volatile variant for __atomic_clear and __atomic_test_and_set
- Add missing parameters for __builtin_fmax and related

Change-Id: Ib31d1a410b8749f5672d70d7d02ca1dff962c38b
Signed-off-by: Martin Oberhuber <mober.at+eclipse@gmail.com>
2017-12-01 11:27:46 -05:00
Hansruedi Patzen
a4dcbbaf15 Bug 527553: Detect invalid decltype(auto) with a type specifier
The evaluated type of 'decltype(auto)' in combination with const and/or
volatile will be a ProblemType since this is not valid code. The patch
also contains a checker to give the user a visual feedback.

Note: A proposed quick-fix has been removed after a short discussion.

Change-Id: I8760ed0ac28e28529ab30516accac9c0413c87d9
Signed-off-by: Hansruedi Patzen <hansruedi.patzen@hsr.ch>
2017-11-30 14:56:02 -05:00
Doug Schaefer
a69ce37879 Info cache files were not getting deleted properly
When deleting projects then creating them with the same name
the scanner info didn't get cleared up and was reused. We
were deleting these files from the wrong path.

Change-Id: Ieda174b7cfc9690ab51be65e674bda321cb3bc10
2017-11-28 13:19:16 -05:00
Hansruedi Patzen
7d208e098f Bug 527872: UDL operator name gets duplicated on rewrite
Change-Id: Id1cda5f09f6fc3852a99a607be21f6ea33f5faf5
Signed-off-by: Hansruedi Patzen <hansruedi.patzen@hsr.ch>
2017-11-28 15:40:28 +01:00
Doug Schaefer
6db1357b1a Stop launch on error. Fix up set/get make commands.
We were missing the dialog to ask if you wanted to continue
after build errors in a project. We were missing the method
that provided the list of projects to do that check.

Also while testing that noticed the handling of the build
and clean command UI was broken with make projects.

Change-Id: I698e151672a114bb22c815f49d362b6413b9c315
2017-11-27 18:04:40 -05:00
Doug Schaefer
68b441c16d Bug 444054 - Make sure we build the right project
The call to CDTBuildAction's super updateSelection method
clears out some state. Make sure we call it even though we
want to always build CDT projects.

Change-Id: Ie5dc1f583bbcc04d85b7254a4b7c18ee50f02997
2017-11-27 11:02:07 -05:00
Hansruedi Patzen
3319c8596e Bug 527396: Parser includes curly brace when parsing noexcept functions
Change-Id: I0d2626cccf5b093f2f3cc9fbcbeaedbb21ebd508
Signed-off-by: Hansruedi Patzen <hansruedi.patzen@hsr.ch>
2017-11-24 13:25:00 -05:00
Hansruedi Patzen
19b4848e08 Bug 527709 - [Checker] Test suite fails on Windows
Change-Id: I70cf18245dc8dba14493f212c932ea08ae85a6cf
Signed-off-by: Hansruedi Patzen <hansruedi.patzen@hsr.ch>
2017-11-24 10:44:11 +01:00
Doug Schaefer
93a5fcaa2a Bug 444054 - Always enable the build actions.
If you select a non-CDT project then select a CDT one, the
Build Project menu item wouldn't enable. If you select the
CDT project again, it does. Big question is why isn't it enabled
when selected.

This fix just enables it all the time. Much easier for users
to understand.

Change-Id: I674740f2c6998686cade1f910a269a4e9d935d39
2017-11-23 14:41:10 -05:00
Doug Schaefer
d9b8eb3fd0 Hook up the old Include Paths and Symbols page to Makefile projs.
Makefile projects depend on build output parsing to pick up
compiler options to use while indexing. Sometimes, that just
doesn't work. As a back up we've always allowed users to manually
add them to the project. Long ago when we had pure make projects
we had UI for this. This change hooks that old UI up. It was a
time before build configs so they get applied to them all but it
serves it's role as a backup when users run into problems.

Unmarked everything I use here from deprecated until we decide
how to replace these with Core build config aware settings.

Change-Id: I6fc4d48e5315df3c60c7591b026ae0a53a1f505e
2017-11-22 16:40:14 -05:00
Doug Schaefer
682243a727 Undo the fix I did for creating the build container.
It cause more problems than it solved. Will need to revisit later.

Change-Id: Ifbbb2a29c41f24ff08e1debb03ee5f4739d0223b
2017-11-20 22:02:25 -05:00
Doug Schaefer
a90655bc04 Set CC and CXX variables to toolchain compileCommands in std build.
Also set BUILD_MODE to the launch mode so the makefile can do
different things based on the mode. Change template to add -g
option for debug.

Also fix a deadlock I detected due to side affect build folder
creation.

Change-Id: Ic7b13ba3238e6ef201cccb1b2bfc8dcc6956ea3a
2017-11-20 15:55:39 -05:00
Doug Schaefer
dc4be72b1a Fix MSYS2 so that it's provider overrides the path provider.
Also handle case when launchMode is null when creating a build
config.

Change-Id: Ie70de785168c2e24c842d517c64a297ba44e24f4
2017-11-20 13:28:22 -05:00
Doug Schaefer
461f90901c Fix missing recording of launch mode for core build configs.
Was causing new build configs to be created for non "run" mode
configs.

Change-Id: I6b939ac1da9fcf6678bf28b0bbad201fc723b371
2017-11-16 12:12:10 -05:00
Nathan Ridge
f2ab40d9f2 Bug 526975 - Deduce return type correctly in the presence of multiple return statements
The previous implementation deviated from the C++ standard by checking
that the types of the return expressions are the same, rather than the
return types after deduction against the placeholder type.

There was also a bug in the return type deduction code for lambdas,
where for a lambda without an explicit placeholder in the trailing-
return-type, the deduction process wouldn't be performed.

Change-Id: I2f0b9f1c7778aef60e4cd7ada9386b99be52669a
2017-11-15 11:38:40 -05:00
Hansruedi Patzen
b721d6a424 Bug 527179: ExpressionWriter removes nested noexcept expressions
Change-Id: I7c032e9327756704690760f3207c73f1645deb19
Signed-off-by: Hansruedi Patzen <hansruedi.patzen@hsr.ch>
2017-11-15 03:29:51 -05:00
Nathan Ridge
1bf0dff19f Bug 526857 - Diagnose member access into pointer type in C code
Change-Id: Ib6fc6be443d59facacde3c290e0f974e5cbe6f1b
2017-11-14 19:47:39 -05:00
Jonah Graham
c9c292982d Bug 519533: Fix scroll lock on build console
Change-Id: Ib7826de6ed26dbd05f2568d097deb52cf3dc4768
2017-11-14 19:04:40 -04:00