Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "CDT/User/NewIn93"

< CDT
(Editor: Add section about constructor completion with uniform initialization)
 
(25 intermediate revisions by 8 users not shown)
Line 1: Line 1:
== Release ==
+
= Release =
 
+
----
 
This is the New & Noteworthy page for CDT 9.3 which is part of the Eclipse Oxygen release of June 2017
 
This is the New & Noteworthy page for CDT 9.3 which is part of the Eclipse Oxygen release of June 2017
 
+
----
== General ==
+
= Editor =
 
+
----
== Editor ==
+
== Open Declaration ==
 
+
----
=== Open Declaration ===
+
{| style="width: 100%;"
 
+
|- style="vertical-align:top;"
==== Following includes in inactive code paths ====
+
! style="width: 30%; text-align:left;" | C++11 "auto" variables
 
+
| For variables whose type is declared with the C++11 <code>auto</code> keyword, Open Declaration on the <code>auto</code> opens the declaration of the deduced type ([http://eclip.se/511522 bug 511522)].
Open Declaration can now follow <code>#include</code>s in inactive code paths ([http://eclip.se/379623 bug 379623)].
+
|}
 
+
----
==== Navigation to forward declaration of class template ====
+
{| style="width: 100%;"
 
+
|- style="vertical-align:top;"
Open Declaration [http://eclip.se/483048 now supports] navigation from the definition of a class template to its forward declaration.
+
! style="width: 30%; text-align:left;" | Following includes in inactive code paths
 +
| Open Declaration can now follow <code>#include</code>s in inactive code paths ([http://eclip.se/379623 bug 379623)].
 +
|}
 +
----
 +
{| style="width: 100%;"
 +
|- style="vertical-align:top;"
 +
! style="width: 30%; text-align:left;" | Navigation to forward declaration of class template
 +
| Open Declaration [http://eclip.se/483048 now supports] navigation from the definition of a class template to its forward declaration.
  
 
This can be useful in cases where some of the class template's template parameter have default arguments, as the default arguments may only be declared at the forward declaration.
 
This can be useful in cases where some of the class template's template parameter have default arguments, as the default arguments may only be declared at the forward declaration.
  
[[File:CDTNavigateToFwdDeclBefore.png]]
+
[[File:CDTNavigateToFwdDeclBeforeV2.png]]
[[File:CDTNavigateToFwdDeclAfter.png]]
+
[[File:CDTNavigateToFwdDeclAfterV2.png]]
 
+
|}
==== Open Declaration in assembly files ====
+
----
 
+
{| style="width: 100%;"
The Open Declaration action is now supported in assembly files.
+
|- style="vertical-align:top;"
 +
! style="width: 30%; text-align:left;" | Open Declaration in assembly files
 +
| The Open Declaration action is now supported in assembly files.
  
 
[[File:CDTAssemblyOpenDeclBefore.png]]
 
[[File:CDTAssemblyOpenDeclBefore.png]]
Line 30: Line 39:
  
 
The action works on #include directives ([http://eclip.se/507285 bug 507285]) and identifiers ([http://eclip.se/507974 bug 507974]).
 
The action works on #include directives ([http://eclip.se/507285 bug 507285]) and identifiers ([http://eclip.se/507974 bug 507974]).
 
+
|}
=== Content Assist ===
+
----
 
+
== Content Assist ==
==== Completion of member functions when taking the address ====
+
----
 
+
{| style="width: 100%;"
After a classname qualifier such as <code>MyClass::</code>, CDT generally only offers static methods as completion proposals, since nonstatic methods need to be called on an object.
+
|- style="vertical-align:top;"
 +
! style="width: 30%; text-align:left;" | Completion of member functions when taking the address
 +
| After a classname qualifier such as <code>MyClass::</code>, CDT generally only offers static methods as completion proposals, since nonstatic methods need to be called on an object.
  
 
However, sometimes the address of a nonstatic method is taken, usually to be passed as a callback. CDT now recognizes the <code>&MyClass::</code> form used to do this, and offers nonstatic methods as completion proposals ([http://eclip.se/395562 bug 395562]).
 
However, sometimes the address of a nonstatic method is taken, usually to be passed as a callback. CDT now recognizes the <code>&MyClass::</code> form used to do this, and offers nonstatic methods as completion proposals ([http://eclip.se/395562 bug 395562]).
  
 
[[File:CDTAddressofMethodCompletion.png]]
 
[[File:CDTAddressofMethodCompletion.png]]
 
+
|}
==== Improved content assist in inactive code ====
+
----
 
+
{| style="width: 100%;"
Content assist in inactive code (code disabled by an <code>#ifdef</code>) was improved in [http://eclip.se/72809 bug 72809]. It's still not on par with content assist in active code, but completions for entities declared in active code preceding the point of invocation are now proposed.
+
|- style="vertical-align:top;"
 
+
! style="width: 30%; text-align:left;" | Improved content assist in inactive code
==== Included files with no file extension ====
+
| Content assist in inactive code (code disabled by an <code>#ifdef</code>) was improved in [http://eclip.se/72809 bug 72809]. It's still not on par with content assist in active code, but completions for entities declared in active code preceding the point of invocation are now proposed.
 
+
|}
CDT [http://eclip.se/292229 now offers] completion proposals for files with files extensions other than the usual C/C++ header file extensions (such as <code>.h</code> or <code>.hpp</code>) when content assist is invoked in an <code>#include</code> directive. This is useful for libraries that use header names with no extensions, such as Qt or KDE, as well as scenarios where non-header files (such as resource files) are included.
+
----
 +
{| style="width: 100%;"
 +
|- style="vertical-align:top;"
 +
! style="width: 30%; text-align:left;" | Included files with no file extension
 +
| CDT [http://eclip.se/292229 now offers] completion proposals for files with files extensions other than the usual C/C++ header file extensions (such as <code>.h</code> or <code>.hpp</code>) when content assist is invoked in an <code>#include</code> directive. This is useful for libraries that use header names with no extensions, such as Qt or KDE, as well as scenarios where non-header files (such as resource files) are included.
  
 
[[File:CDTIncludeCompletionNoExtension.png]]
 
[[File:CDTIncludeCompletionNoExtension.png]]
  
 
To avoid polluting content assist proposals with irrelevant files, in cases where a directory contains both files with the usual C/C++ header extensions, and other files, proposals for files in the first category are shown first.
 
To avoid polluting content assist proposals with irrelevant files, in cases where a directory contains both files with the usual C/C++ header extensions, and other files, proposals for files in the first category are shown first.
 +
|}
 +
----
 +
{| style="width: 100%;"
 +
|- style="vertical-align:top;"
 +
! style="width: 30%; text-align:left;" | Enhanced parameter hints
 +
| CDT's parameter hints have been enhanced ([http://eclip.se/461680 bug 461680]). They now show the full signature of the function being called, including its return type, containing class (if it's a method), and whether it's virtual.
  
==== Enhanced parameter hints ====
+
[[File:CDTEnhancedParameterHint.png]]
 +
|}
 +
----
 +
{| style="width: 100%;"
 +
|- style="vertical-align:top;"
 +
! style="width: 30%; text-align:left;" | Constructor completion with uniform initialization syntax
 +
|
 +
CDT's content assist now recognizes constructor calls that use the C++11 uniform initialization syntax and offers completion proposals for the constructor(s).
  
CDT's parameter hints have been enhanced ([http://eclip.se/461680 bug 461680]). They now show the full signature of the function being called, including its return type, containing class (if it's a method), and whether it's virtual.
+
[[File:CDTUniformInitConstructorCompletion.png]]
 +
|}
 +
----
 +
== Search ==
 +
----
 +
{| style="width: 100%;"
 +
|- style="vertical-align:top;"
 +
! style="width: 30%; text-align:left;" | Enclosing definition of macro reference
 +
|
 +
In the Search view, the enclosing definition (function and class if applicable) is now shown for macro references the way it is for references to other entities ([http://eclip.se/508216 bug 508216]).
  
[[File:CDTEnhancedParameterHint.png]]
+
[[File:CDTEnclosingDefForMacroReference.png]]
 +
|}
 +
----
 +
== Placement of <code>const</code> ==
 +
----
 +
{| style="width: 100%;"
 +
|- style="vertical-align:top;"
 +
! style="width: 30%; text-align:left;" | Choose the placement of <code>const</code> keyword
 +
|
 +
The <code>const</code> keyword can now be placed left or right to the type in a declaration specifier ([http://eclip.se/491957 bug 491957]). A new preference sets the location (Preferences -> C/C++ -> Code Style):
  
==== Constructor completion with uniform initialization syntax ====
+
[[File:CDTConstPlacementPreference.png]]
 +
|}
 +
----
 +
{| style="width: 100%;"
 +
|- style="vertical-align:top;"
 +
! style="width: 30%; text-align:left;" | When CDT generates new source code
 +
|
 +
For example in a refactoring the <code>const</code> keyword will be written accordingly:
  
CDT's content assist now recognizes constructor calls that use the C++11 uniform initialization syntax and offers completion proposals for the constructor(s).
+
[[File:CDTConstPlacementInRefactoringPreview.png]]
 +
|}
 +
----
 +
{| style="width: 100%;"
 +
|- style="vertical-align:top;"
 +
! style="width: 30%; text-align:left;" | To adapt all <code>const</code> occurrences in the current file
 +
|
 +
There is an action '''Align Const''' in the '''Source''' menu (Mnemonic <code>ctrl+shift+A</code>):
  
[[File:CDTUniformInitConstructorCompletion.png]]
+
[[File:CDTAlignConstSourceAction.png]]
 +
|}
 +
== Folding Comments ==
 +
----
 +
{| style="width: 100%;"
 +
|- style="vertical-align:top;"
 +
! style="width: 30%; text-align:left;" | Folding of Comments Improvements
 +
|
 +
Some improvements have been made to folding comments. Documentation comments can now fold together when using '''///''' style comments. In addition new preferences on initial folding state of comments have been provided.
  
=== Search ===
+
[[File:CDT_9_3_New_Folding_comments.png]]
  
==== Enclosing definition of macro reference ====
 
  
In the Search view, the enclosing definition (function and class if applicable) is now shown for macro references the way it is for references to other entities ([http://eclip.se/508216 bug 508216]).
+
See ([http://eclip.se/515101 bug 515101]).
 +
|}
 +
----
  
[[File:CDTEnclosingDefForMacroReference.png]]
+
= Code Analysis =
 +
----
 +
== GCC Build Quick-fixes ==
 +
----
  
== Makefile Editor ==
+
Quick fixes have been added for a variety of build errors generated by the gcc compiler.  Such
 +
fixes include:
  
== Code Analysis ==
+
{| style="width: 100%;"
 +
|- style="vertical-align:top;"
 +
! style="width: 30%; text-align:left;" |
 +
* missing semi-colon
 +
|
 +
[[File:CDTSemicolonFixitV2.png]]
 +
|}
 +
----
 +
{| style="width: 100%;"
 +
|- style="vertical-align:top;"
 +
! style="width: 30%; text-align:left;" |
 +
* specification of wrong member (gcc 6 and above).
 +
|
 +
[[File:CDTWrongMemberFixitV2.png]]
 +
|}
 +
----
 +
{| style="width: 100%;"
 +
|- style="vertical-align:top;"
 +
! style="width: 30%; text-align:left;" |
 +
* use of . operator instead of ->
 +
|
 +
[[File:CDTNeedPtrV2.png]]
 +
|}
 +
----
 +
{| style="width: 100%;"
 +
|- style="vertical-align:top;"
 +
! style="width: 30%; text-align:left;" |
 +
* use of -> operator instead of .
 +
|
 +
[[File:CDTNeedDotV2.png]]
 +
|}
 +
----
  
== Parser ==
+
{| style="width: 100%;"
 +
|- style="vertical-align:top;"
 +
! style="width: 30%; text-align:left;" | Support for -fdiagnostics-parseable-fixits
 +
|
 +
Clang and gcc 7 have support for generating fix-it suggestions for various compiler errors.  When
 +
the -fdiagnostics-parseable-fixits option is specified for the build, CDT is able to parse these
 +
fix-it messages and generate quick-fixes for them.
  
=== More accurate binding resolution ===
+
[[File:CDTParseableFixitsV2.png]]
 +
|}
 +
----
 +
= Parser =
 +
----
  
 +
{| style="width: 100%;"
 +
|- style="vertical-align:top;"
 +
! style="width: 30%; text-align:left;" |  More accurate binding resolution
 +
|
 
This release fixes a [https://bugs.eclipse.org/bugs/show_bug.cgi?id=402498 long-standing issue] where the indexer would resolve names in a source file that referenced entities that did not have a declaration in any file included by that source file, only in other files in the project.
 
This release fixes a [https://bugs.eclipse.org/bugs/show_bug.cgi?id=402498 long-standing issue] where the indexer would resolve names in a source file that referenced entities that did not have a declaration in any file included by that source file, only in other files in the project.
  
 
As a result of this change, the set of semantic errors produced by the indexer should more closely resemble what an actual compiler produces.
 
As a result of this change, the set of semantic errors produced by the indexer should more closely resemble what an actual compiler produces.
  
== Formatter ==
+
Another positive effect is, that CODAN now reports "unresolved symbol" errors when a symbol is used but the corresponding #include was not added. This may help fixing such issues (potentially by using "organize includes") before invoking the compiler, thus saving time.
 +
|}
 +
----
 +
{| style="width: 100%;"
 +
|- style="vertical-align:top;"
 +
! style="width: 30%; text-align:left;" | Exposing the CDT version number for feature-testing
 +
|
 +
CDT defines the <code>__CDT_PARSER__</code> macro while parsing code. This allows having a block of code in a preprocessor branch that CDT sees but the compiler does not, or vice versa, which can be useful for working around CDT limitations.
  
== Build  ==
+
Previously, the value of this macro was <code>1</code>. Now it encodes the CDT version as well, so that e.g. for CDT version 9.2.1, the value of the macro is <code>90201</code>.
=== Prebuild task and parallel make ===
+
|}
 +
----
 +
{| style="width: 100%;"
 +
|- style="vertical-align:top;"
 +
! style="width: 30%; text-align:left;" | C++14 Language Support
 +
|
 +
Support for two new C++14 language features has been added: [https://bugs.eclipse.org/bugs/show_bug.cgi?id=408470 return type deduction] and [https://bugs.eclipse.org/bugs/show_bug.cgi?id=516627 generic lambdas].
 +
|}
 +
----
 +
= Build  =
 +
----
 +
{| style="width: 100%;"
 +
|- style="vertical-align:top;"
 +
! style="width: 30%; text-align:left;" | Prebuild task and parallel make
 +
|
 
Pre-build tasks and parallel make is now working together. Pre-build tasks can be used to generate header and source files as the pre-build task is now guaranteed to complete before any source code is built.  
 
Pre-build tasks and parallel make is now working together. Pre-build tasks can be used to generate header and source files as the pre-build task is now guaranteed to complete before any source code is built.  
  
 
Also, the build targets under Project Settings -> C/C++ Build -> Behavior -> Workbench Build Behavior is respected and works the same for projects both with and without pre-build tasks.
 
Also, the build targets under Project Settings -> C/C++ Build -> Behavior -> Workbench Build Behavior is respected and works the same for projects both with and without pre-build tasks.
  
This solves ([http://eclip.se/340300 bug 340300]).
+
This solves
  
== Debug ==
+
([http://eclip.se/340300 bug 340300]).
 +
|}
 +
----
 +
{| style="width: 100%;"
 +
|- style="vertical-align:top;"
 +
! style="width: 30%; text-align:left;" | Build console speed up
 +
|
 +
Doing builds in CDT are now significantly faster when there is a lot of output, warnings, and/or errors.
  
=== Support to extend the toolbar of the Debugger Console pages ===
+
The benefits of this improvement are:
  
 +
* The build time in CDT compared to 9.2 / Neon is *much* faster, with speedups most significant on builds where large number of warnings or errors are generated. (For example a file with 10,000 warnings is now 25x faster build time.)
 +
* The build time in CDT is comparable to running in a terminal for most projects.
 +
* The cancel button cancels the build fairly instantaneously
 +
* The implementation is designed to limit the amount of UI thread used to ensure the UI stays responsive.
 +
* The "took" time reported at the end of the build is accurate
 +
 +
This solves ([http://eclip.se/314428 bug 314428]).
 +
|}
 +
----
 +
{| style="width: 100%;"
 +
|- style="vertical-align:top;"
 +
! style="width: 30%; text-align:left;" | .SECONDARY removed from generated Makefiles
 +
|
 +
In this release of CDT '''.SECONDARY:''' with no dependencies has been removed from the generated Makefiles. .SECONDARY with no dependencies can allow a build to succeed even if some dependencies are required. In the unlikely event that a project was depending on such behaviour the behaviour can be restored by creating a '''makefile.targets''' in the root of the project with '''.SECONDARY:''' as the file's contents. See the bug for more details.
 +
 +
This solves ([http://eclip.se/516813 bug 516813]).
 +
|}
 +
 +
----
 +
= Debug =
 +
----
 +
{| style="width: 100%;"
 +
|- style="vertical-align:top;"
 +
! style="width: 30%; text-align:left;" | Support to extend the toolbar of the Debugger Console pages
 +
|
 
Just like the standard Console view, the Debugger Console view now allows the use of the [http://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fextension-points%2Forg_eclipse_ui_console_consolePageParticipants.html Console Page Participants] extension point.  By using this extension, extenders can add buttons to the toolbar of the different pages of the Debugger Console view.  An example of such additions can be found in ''org.eclipse.cdt.examples.dsf.gdb/GdbExtendedConsolePageParticipant.java'' and has been copied below.
 
Just like the standard Console view, the Debugger Console view now allows the use of the [http://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fextension-points%2Forg_eclipse_ui_console_consolePageParticipants.html Console Page Participants] extension point.  By using this extension, extenders can add buttons to the toolbar of the different pages of the Debugger Console view.  An example of such additions can be found in ''org.eclipse.cdt.examples.dsf.gdb/GdbExtendedConsolePageParticipant.java'' and has been copied below.
 +
  
 
  <nowiki>
 
  <nowiki>
Line 123: Line 295:
 
   </extension>
 
   </extension>
 
</nowiki>
 
</nowiki>
 +
|}
  
 +
{| style="width: 100%;"
 +
|- style="vertical-align:top;"
 +
! style="width: 30%; text-align:left;" |
 +
|
 
Furthermore, a new method was added to provide access to the full console widget.  This allows to modify or extend the behaviour of the full GDB console.  The method in question is ''GdbFullCliConsolePage#getTerminalViewControl()'' which returns an ''ITerminalViewControl''.  ConsolePageParticipants are provided with the console page in their ''init()'' method; they can then cast it to ''GdbFullCliConsolePage'' to access the ''ITerminalViewControl''.
 
Furthermore, a new method was added to provide access to the full console widget.  This allows to modify or extend the behaviour of the full GDB console.  The method in question is ''GdbFullCliConsolePage#getTerminalViewControl()'' which returns an ''ITerminalViewControl''.  ConsolePageParticipants are provided with the console page in their ''init()'' method; they can then cast it to ''GdbFullCliConsolePage'' to access the ''ITerminalViewControl''.
  
 
This support was a contribution from Stephen Flynn from Dell-EMC.
 
This support was a contribution from Stephen Flynn from Dell-EMC.
 +
|}
 +
----
 +
== Source not found editor modifications ==
 +
----
 +
{| style="width: 100%;"
 +
|- style="vertical-align:top;"
 +
! style="width: 30%; text-align:left;" | User have now 3 choices to display the source not found editor :
 +
|
 +
  - Source you were jumping into is not found:
 +
  - Function name known but can't find its source:
 +
  - Unknown function name
 +
 +
[[File:CDTCSourceNotFoundEditorV2.png]]
 +
|}
 +
----
 +
== Launch Group ==
 +
----
 +
{| style="width: 100%;"
 +
|- style="vertical-align:top;"
 +
! style="width: 30%; text-align:left;" | Launch Group now part of Eclipse Platform :
 +
|
 +
 
 +
The Launch Group feature of CDT has been promoted to the Eclipse Platform. The version in CDT has been deprecated and will be removed in a future version.
 +
 +
The new Launch Group type can be identified by the [[File:CDT_NEW93_Launch_Group.png]] icon and the deprecated Launch Group has "(deprecated)" in its title.
 +
 +
See the [https://www.eclipse.org/eclipse/news/4.7/platform.php#launch-groups news item in Eclipse Platform] for more details, and [[CDT/User/LaunchGroupMigrationInfo]].
 +
 +
 +
|}
 +
 +
----
  
== Bugs Fixed in this Release ==
+
= Arduino C++ =
 +
----
 +
{| style="width: 100%;"
 +
|- style="vertical-align:top;"
 +
! style="width: 30%; text-align:left;" | Support for Arduino
 +
|
 +
Added support for Arduino serial connections to use the TM Terminal's new CDT Serial Port terminal connector.
 +
[[File:Screen_Shot_2017-05-31_at_10.46.38_AM.png]]
 +
|}
  
 +
----
 +
= API modifications =
 +
----
 +
{| style="width: 100%;"
 +
|- style="vertical-align:top;"
 +
! style="width: 30%; text-align:left;" | org.eclipse.cdt.dsf.gdb
 +
|
 +
# The method '''MIVariableManager.MIVariableObject#isComplex()''' has changed to always return false because we can't reliably determine whether a variable is complex or not (see [http://eclip.se/399494 bug 399494]). Extenders should make sure that code calling this method will not misbehave.
 +
|}
 +
----
 +
= Bugs Fixed in this Release =
 +
----
 
See Bugzilla report [https://bugs.eclipse.org/bugs/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&classification=Tools&product=CDT&query_format=advanced&resolution=FIXED&target_milestone=9.3.0 Bugs Fixed in CDT 9.3]
 
See Bugzilla report [https://bugs.eclipse.org/bugs/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&classification=Tools&product=CDT&query_format=advanced&resolution=FIXED&target_milestone=9.3.0 Bugs Fixed in CDT 9.3]

Latest revision as of 03:27, 24 November 2017

Release


This is the New & Noteworthy page for CDT 9.3 which is part of the Eclipse Oxygen release of June 2017


Editor


Open Declaration


C++11 "auto" variables For variables whose type is declared with the C++11 auto keyword, Open Declaration on the auto opens the declaration of the deduced type (bug 511522).

Following includes in inactive code paths Open Declaration can now follow #includes in inactive code paths (bug 379623).

Navigation to forward declaration of class template Open Declaration now supports navigation from the definition of a class template to its forward declaration.

This can be useful in cases where some of the class template's template parameter have default arguments, as the default arguments may only be declared at the forward declaration.

CDTNavigateToFwdDeclBeforeV2.png CDTNavigateToFwdDeclAfterV2.png


Open Declaration in assembly files The Open Declaration action is now supported in assembly files.

CDTAssemblyOpenDeclBefore.png CDTAssemblyOpenDeclAfter.png

The action works on #include directives (bug 507285) and identifiers (bug 507974).


Content Assist


Completion of member functions when taking the address After a classname qualifier such as MyClass::, CDT generally only offers static methods as completion proposals, since nonstatic methods need to be called on an object.

However, sometimes the address of a nonstatic method is taken, usually to be passed as a callback. CDT now recognizes the &MyClass:: form used to do this, and offers nonstatic methods as completion proposals (bug 395562).

CDTAddressofMethodCompletion.png


Improved content assist in inactive code Content assist in inactive code (code disabled by an #ifdef) was improved in bug 72809. It's still not on par with content assist in active code, but completions for entities declared in active code preceding the point of invocation are now proposed.

Included files with no file extension CDT now offers completion proposals for files with files extensions other than the usual C/C++ header file extensions (such as .h or .hpp) when content assist is invoked in an #include directive. This is useful for libraries that use header names with no extensions, such as Qt or KDE, as well as scenarios where non-header files (such as resource files) are included.

CDTIncludeCompletionNoExtension.png

To avoid polluting content assist proposals with irrelevant files, in cases where a directory contains both files with the usual C/C++ header extensions, and other files, proposals for files in the first category are shown first.


Enhanced parameter hints CDT's parameter hints have been enhanced (bug 461680). They now show the full signature of the function being called, including its return type, containing class (if it's a method), and whether it's virtual.

CDTEnhancedParameterHint.png


Constructor completion with uniform initialization syntax

CDT's content assist now recognizes constructor calls that use the C++11 uniform initialization syntax and offers completion proposals for the constructor(s).

CDTUniformInitConstructorCompletion.png


Search


Enclosing definition of macro reference

In the Search view, the enclosing definition (function and class if applicable) is now shown for macro references the way it is for references to other entities (bug 508216).

CDTEnclosingDefForMacroReference.png


Placement of const


Choose the placement of const keyword

The const keyword can now be placed left or right to the type in a declaration specifier (bug 491957). A new preference sets the location (Preferences -> C/C++ -> Code Style):

CDTConstPlacementPreference.png


When CDT generates new source code

For example in a refactoring the const keyword will be written accordingly:

CDTConstPlacementInRefactoringPreview.png


To adapt all const occurrences in the current file

There is an action Align Const in the Source menu (Mnemonic ctrl+shift+A):

CDTAlignConstSourceAction.png

Folding Comments


Folding of Comments Improvements

Some improvements have been made to folding comments. Documentation comments can now fold together when using /// style comments. In addition new preferences on initial folding state of comments have been provided.

CDT 9 3 New Folding comments.png


See (bug 515101).


Code Analysis


GCC Build Quick-fixes


Quick fixes have been added for a variety of build errors generated by the gcc compiler. Such fixes include:

  • missing semi-colon

CDTSemicolonFixitV2.png


  • specification of wrong member (gcc 6 and above).

CDTWrongMemberFixitV2.png


  • use of . operator instead of ->

CDTNeedPtrV2.png


  • use of -> operator instead of .

CDTNeedDotV2.png


Support for -fdiagnostics-parseable-fixits

Clang and gcc 7 have support for generating fix-it suggestions for various compiler errors. When the -fdiagnostics-parseable-fixits option is specified for the build, CDT is able to parse these fix-it messages and generate quick-fixes for them.

CDTParseableFixitsV2.png


Parser


More accurate binding resolution

This release fixes a long-standing issue where the indexer would resolve names in a source file that referenced entities that did not have a declaration in any file included by that source file, only in other files in the project.

As a result of this change, the set of semantic errors produced by the indexer should more closely resemble what an actual compiler produces.

Another positive effect is, that CODAN now reports "unresolved symbol" errors when a symbol is used but the corresponding #include was not added. This may help fixing such issues (potentially by using "organize includes") before invoking the compiler, thus saving time.


Exposing the CDT version number for feature-testing

CDT defines the __CDT_PARSER__ macro while parsing code. This allows having a block of code in a preprocessor branch that CDT sees but the compiler does not, or vice versa, which can be useful for working around CDT limitations.

Previously, the value of this macro was 1. Now it encodes the CDT version as well, so that e.g. for CDT version 9.2.1, the value of the macro is 90201.


C++14 Language Support

Support for two new C++14 language features has been added: return type deduction and generic lambdas.


Build


Prebuild task and parallel make

Pre-build tasks and parallel make is now working together. Pre-build tasks can be used to generate header and source files as the pre-build task is now guaranteed to complete before any source code is built.

Also, the build targets under Project Settings -> C/C++ Build -> Behavior -> Workbench Build Behavior is respected and works the same for projects both with and without pre-build tasks.

This solves

(bug 340300).


Build console speed up

Doing builds in CDT are now significantly faster when there is a lot of output, warnings, and/or errors.

The benefits of this improvement are:

  • The build time in CDT compared to 9.2 / Neon is *much* faster, with speedups most significant on builds where large number of warnings or errors are generated. (For example a file with 10,000 warnings is now 25x faster build time.)
  • The build time in CDT is comparable to running in a terminal for most projects.
  • The cancel button cancels the build fairly instantaneously
  • The implementation is designed to limit the amount of UI thread used to ensure the UI stays responsive.
  • The "took" time reported at the end of the build is accurate

This solves (bug 314428).


.SECONDARY removed from generated Makefiles

In this release of CDT .SECONDARY: with no dependencies has been removed from the generated Makefiles. .SECONDARY with no dependencies can allow a build to succeed even if some dependencies are required. In the unlikely event that a project was depending on such behaviour the behaviour can be restored by creating a makefile.targets in the root of the project with .SECONDARY: as the file's contents. See the bug for more details.

This solves (bug 516813).


Debug


Support to extend the toolbar of the Debugger Console pages

Just like the standard Console view, the Debugger Console view now allows the use of the Console Page Participants extension point. By using this extension, extenders can add buttons to the toolbar of the different pages of the Debugger Console view. An example of such additions can be found in org.eclipse.cdt.examples.dsf.gdb/GdbExtendedConsolePageParticipant.java and has been copied below.


   <extension point="org.eclipse.ui.console.consolePageParticipants">
      <consolePageParticipant
            class="org.eclipse.cdt.examples.dsf.gdb.ui.console.GdbExtendedConsolePageParticipant"
            id="org.eclipse.cdt.examples.dsf.gdb.debuggerConsolePageParticipant">
         <enablement>
         <and>
            <instanceof value="org.eclipse.cdt.debug.ui.debuggerconsole.IDebuggerConsole"/>
            <!-- The below check only works with the Debugger Console view and not the
                 standard console view.  But that is ok since this contribution is
                 for the Debugger Console views only. -->
            <with variable="org.eclipse.core.runtime.Platform">
               <test property="org.eclipse.core.runtime.bundleState"
                     args="org.eclipse.cdt.examples.dsf.gdb"
                     value="ACTIVE">
               </test>
            </with>
         </and>
         </enablement>
      </consolePageParticipant>
   </extension>

Furthermore, a new method was added to provide access to the full console widget. This allows to modify or extend the behaviour of the full GDB console. The method in question is GdbFullCliConsolePage#getTerminalViewControl() which returns an ITerminalViewControl. ConsolePageParticipants are provided with the console page in their init() method; they can then cast it to GdbFullCliConsolePage to access the ITerminalViewControl.

This support was a contribution from Stephen Flynn from Dell-EMC.


Source not found editor modifications


User have now 3 choices to display the source not found editor :
 - Source you were jumping into is not found:
 - Function name known but can't find its source:
 - Unknown function name

CDTCSourceNotFoundEditorV2.png


Launch Group


Launch Group now part of Eclipse Platform :

The Launch Group feature of CDT has been promoted to the Eclipse Platform. The version in CDT has been deprecated and will be removed in a future version.

The new Launch Group type can be identified by the CDT NEW93 Launch Group.png icon and the deprecated Launch Group has "(deprecated)" in its title.

See the news item in Eclipse Platform for more details, and CDT/User/LaunchGroupMigrationInfo.



Arduino C++


Support for Arduino

Added support for Arduino serial connections to use the TM Terminal's new CDT Serial Port terminal connector. Screen Shot 2017-05-31 at 10.46.38 AM.png


API modifications


org.eclipse.cdt.dsf.gdb
  1. The method MIVariableManager.MIVariableObject#isComplex() has changed to always return false because we can't reliably determine whether a variable is complex or not (see bug 399494). Extenders should make sure that code calling this method will not misbehave.

Bugs Fixed in this Release


See Bugzilla report Bugs Fixed in CDT 9.3

Back to the top