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

13510 commits

Author SHA1 Message Date
Nathan Ridge
f9e4f1077a Bug 408470 - Add a missing message for a problem type
Change-Id: Ic2d6db5d961bbfe403edc61113c1ffacf30228f3
2017-05-13 23:13:51 -04:00
Nathan Ridge
88e19bfee6 Bug 408470 - Introduce static ProblemType instances for more problem types
Change-Id: Ib025e61aaf70f68bfe655527add2c441b9f647d7
2017-05-13 14:29:38 -04:00
Nathan Ridge
882f8e95a9 Bug 516291 - Improve propagattion of instantiate failures through EvalFunctionCall and EvalComma
Change-Id: Ieafe15a88c3838d15aaaf9043199ae2caf1c31db
2017-05-12 23:28:30 -04:00
Nathan Ridge
9b809b0ad7 Bug 516291 - If a function call has dependent arguments, resolve the function name as a CPPDeferredFunction even if there is only one viable candidate
This ensures that, when instantiating the function call, we get into
EvalFunctionSet.resolveFunction(), and check that the function is
actually callable with the instantiated argument types, and error out
if it isn't (which is important for SFINAE purposes).

Change-Id: Ia01755bc1a830fded1f61658f4beef875cc0b029
2017-05-12 23:28:11 -04:00
Nathan Ridge
9c0d9fec08 Bug 516290 - Correct computation of decltype(expr) for dependent expressions
Change-Id: Iabc49563e85e8649a94a77210eb066253925ea3c
2017-05-12 22:49:23 -04:00
Jonah Graham
b564575d51 Bug 314428: speedup build console - limit UI thread
Re-wrote the BuildConsolePartitioner to do as many operations as possible
in the non-UI thread and only to update the UI thread in batches.

Key changes:
- The UI thread "pulls" changes when it is ready, this means that many
  lines of output are updated in one go. This compares to the "push" that
  the non-UI thread used to do. The previous code pushed a change to the
  UI thread on every line of build output.
- The limit on console size is now soft, rather than recalcuating the
  entire document on each line (i.e. add line at bottom, remove line
  from top) the document is truncated to the limit size as it reaches
  2x the limit size. This calculation is also done more effeciently by
  tracking the number of lines each partition contains rather than
  recalculating them.
- Folded most of the implementation of BuildConsolePartition into
  BuildConsolePartitioner. This is because the partioner has a global
  view and is much more efficient at determining if adjacent partitions
  can be combined. In addition, rather than having the complexity of
  splitting partitions that were too long, instead make sure we don't
  create such partitions in the first place.

Change-Id: I47543db3fef754e779684cae44d3316982f1bc0a
2017-05-12 11:51:08 -04:00
Jonah Graham
f14ee6a61d Bug 314428: speedup build console - better handle duplicate markers
This changes the algorithm used to handle duplicate markers when build
is running.

Change-Id: I8d8b61edd80ae4da4c0e0eea3806b0efecb570e0
2017-05-12 11:50:08 -04:00
Nathan Ridge
b10156e36d Bug 516284 - Binding of const class rvalue to T& parameter
Change-Id: Ieb7293c20ba78611097a3d751be16fddb25f3627
2017-05-11 20:48:15 -04:00
Nathan Ridge
a0aeb9153d Bug 516385 - Only use as much space as needed for PDOMCPPAliasTemplate and PDOMCPPAliasTemplateInstance records
Change-Id: Ib8e0de13c49f715806d8c29cb4e8cf07182d5f50
2017-05-11 02:32:23 -04:00
Nathan Ridge
1594835cc6 Bug 508637 - Encode the CDT version in the value of the __CDT_PARSER__ macro
Change-Id: Ic8b571da6cf47297bb615843fab8a8d971c7c2a7
2017-05-11 02:30:12 -04:00
Nathan Ridge
60503efc58 Bug 512932 - Improve type checking of GCC builtins
Specifically, this patch:

  - Adds support for a new builtin, __builtin_assume_aligned.

  - Models __builtin_constant_p as a function instead of a macro.
    This inhibits constexpr evaluation, but allows for correct
    type-checking.

  - Diagnoses misuses of known builtins, instead of ingoring them like
    unknown builtins.

Change-Id: Ie5a26f2010dc5b19e6f32a8c6a1237fe88da393e
2017-05-08 23:04:17 -04:00
Rolf Bislin
a583190f52 Bug 514685 - codan: handle fallthrough attribute
and provide quickfix for adding fallthrough attribute
and add JUnit Tests
and add StandardAttributes class

Change-Id: I8cf0238771dc92bd1784b9dfb35a680d078b1db6
Depends-On: Ic09aa96f896b0a5dd998156e05930704775f695b
Signed-off-by: Rolf Bislin <romibi@bluewin.ch>
Signed-off-by: Thomas Corbat <tcorbat@hsr.ch>
2017-05-08 13:25:15 -04:00
Thomas Corbat
0f27b20848 Bug 516298 - Improved recognition of [[noreturn]] attribute
Change-Id: I275f0ee38045600c104d5ed7e2c14fec04eac046
Signed-off-by: Thomas Corbat <tcorbat@hsr.ch>
2017-05-08 13:23:13 -04:00
Rolf Bislin
fb898b6088 Bug 514684 - call writeAttributes on more Statements
and added JUnit tests

Change-Id: Ic1638e9d125f1897bddd6ef9d4a91f3186ad9dc6
Signed-off-by: Rolf Bislin <romibi@bluewin.ch>
Signed-off-by: Thomas Corbat <tcorbat@hsr.ch>
2017-05-08 13:22:37 -04:00
romibi
5d9dd823fa Bug 514684 - call writeAttributes on more Statements
and added JUnit tests

Change-Id: Ic09aa96f896b0a5dd998156e05930704775f695b
Signed-off-by: romibi <romibi@bluewin.ch>
2017-05-08 02:39:13 -04:00
Nathan Ridge
c22ccedea2 Bug 512932 - Check for standard conversions in CPPEvaluation.maybeApplyConversion()
Previously, we would just assume that if there is no user-defined
conversion involved, the evaluation successfully converts to the target
type.

This increased strictness exposed a couple of other bugs related to
evaluations, which are also fixed in this patch.

Change-Id: I8c40114da341d95b38f1ecc386e875badfe9f8c6
2017-05-07 18:40:25 -04:00
Nathan Ridge
432c3eaa04 Bug 512932 - Do not perform extra type manipulations in EvalMemberAccess.computeType()
The manipulations removed in this change have no basis in the standard,
as far as I can tell by looking at [expr.ref].

Change-Id: I4fc8c342b590dbeb5a876543f736934c162034cc
2017-05-06 00:02:33 -04:00
Nathan Ridge
d4841209b5 Bug 515343 - NPE in NamespaceHelper.checkFileNameAndLocation()
Change-Id: Id281e1cd8ec189e214dcfeffb6d238b66c87050e
2017-05-05 23:59:58 -04:00
Thomas Corbat
5dff17514c Bug 310837 - Indexer misses changes to header in referenced project
Extended PDOMManager to update index for header files in referencing
projects


Change-Id: I5a5b364651dbb854662c31197dd7ad77f13caff0
Signed-off-by: Thomas Corbat <tcorbat@hsr.ch>
2017-05-05 09:44:26 -04:00
Nathan Ridge
a44996a200 Bug 513428 - Ensure PDOM implementations of IASTFileLocation.getFileName() do not return null
Change-Id: I1adb158bd8efc23300bf5c212d6ed4f532a19205
2017-05-03 11:45:26 -04:00
Nathan Ridge
917061f98a Bug 512789 - Guard against infinite recursion in TypeTraits.hasTrivialDefaultConstructor()
The infinite recursion could happen if an inheritance hierarchy has a
cycle in it, or if a class aggregates itself (both of which are invalid).

Change-Id: I99598a57982dca51acab5a1297392f04d9008aec
2017-05-02 23:01:04 -04:00
Doug Schaefer
582a7c10d5 Bug 515990 - Fix constant reindexing in CMake projects
There were issues with how the Core Build calculated whether reindexing
was required due to compiler settings changes. Also if a source file
was built more than once in a CMake build, it ended up always
triggering a reindexing since the second instance looked like a
settings change. We now only use the last compile command for a file.

Change-Id: Icf2922e527ae20e0c3b0dae898d981d334013109
2017-05-02 10:14:13 -04:00
Nathan Ridge
f451a27846 Bug 515453 - Do not have CPPAliasTemplateInstance store its arguments in string form
This ability was only needed by two tests, and stringifying template
arguments is prone to infinite recursion problems.

Change-Id: I485fa09358c0569b48b6847994aed720ba969b1f
2017-05-01 02:02:37 -04:00
Nathan Ridge
87db7de765 Bug 515453 - Clear all ProblemBindings stored during ambiguity resolution
This prevents names getting incorrectly stuck with ProblemBindings
created at a time when the AST wasn't fully ambiguity-resolved yet.

Change-Id: Ibca4a774ee26c393bf2b6decb535b82a2329caad
2017-05-01 02:01:10 -04:00
Pierre Sachot
10b1e6e4c7 Bug 515296: New Preferences for Source not found Editor
You now have more precise options for the Source not
Found Editor.

Change-Id: I7391e50c0a9bf7fc712a45d1946e5a24e91c4991
Signed-off-by: Pierre Sachot <sachot.pierre@laposte.net>
Signed-off-by: Yannick Mayeur <yannick.mayeur@gmail.com>
Also-by: Pierre Sachot <sachot.pierre@laposte.net>
Also-by: Yannick Mayeur <yannick.mayeur@gmail.com>
2017-04-28 12:09:18 -04:00
Marc-Andre Laperle
44067d9115 Bug 514069 - Language Mappings section not shown in file properties if opened from Java's "Package Explorer" view
The Package Explorer's content provider is not extensible the same way
as the CommonNavigator so it does not contain CElement in its tree;
instead it contains IResources (IFile, etc) and Java specific elements.
However, the file language mapping property page is set to be displayed
on selections that adapt to translation units.
So this change allows IFiles to be adapted to ITranslationUnits
therefore the property page can still be shown from the Package Explorer.

Change-Id: Ia52a62c2d8800e2a4f0404bc00e346decbacaa3b
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2017-04-27 10:51:43 -04:00
Nathan Ridge
eb5cfa7052 Bug 515727 - Improve error message
Change-Id: I773850518b265534c462b10c3ba678ac184334c3
2017-04-25 19:06:19 -04:00
Nathan Ridge
375c3c6e50 Bug 515348 - Propagate point of instantiation in EvalTypeId.computeForFunctionCall()
Change-Id: I0b23a1e8ad86cbae225005429ca66ae03e6b3a34
2017-04-25 02:44:39 -04:00
Jonah Graham
cc0955b823 Bug 515560: Avoid indexer race condition by joining the indexer
Change-Id: I13bd33adba4eb790fae0c31d2c1378e19a59f4ff
2017-04-24 07:31:54 -04:00
Nathan Ridge
c8b23ec2d7 Bug 513597 - NPE in DestructorCollector.addDestructorCall()
Change-Id: Ibf971013d1f9e65405a31a1f48c2e4c99731a381
2017-04-23 14:10:39 -04:00
Nathan Ridge
468289a3da Bug 512932 - Type of __func__, __FUNCTION__, and __PRETTY_FUNCTION__ builtins
Change-Id: If0875f0523b9eaf960052c2cc4e3cc01a6432adf
2017-04-23 14:08:59 -04:00
Nathan Ridge
e263da241e Bug 512932 - Delegating constructor in class template partial specialization
Change-Id: Id4cb38d4857af7335a4aa294a6fe149e1a4f2acd
2017-04-23 14:08:29 -04:00
Jonah Graham
b6cb657229 Bug 505743: Improve stderr output on intermittent tests
Change-Id: Ia1a9cdcb5dc05ab051a5c5b3d2d2d20d32e9154b
2017-04-21 09:36:14 -04:00
Pierre Sachot
8be69a5985 Bug 515296: Adding choice to not show editor again
We added a checkbox to disable the source not found editor and an option
in preferences for adding it again.

Change-Id: Icc7a21cd14ea81e53517d0b3c420de0927335ed4
Also-by: Yannick Mayeur <yannick.mayeur@gmail.com>
Signed-off-by: Pierre Sachot <sachot.pierre@laposte.net>
2017-04-21 11:24:47 +01:00
Marc-Andre Laperle
765960cec6 Bug 515545 - NPE when using Extract Function in the presence of auto variable
Change-Id: Id13e7afadbd3c92f1ab5a1448b9851f2d0c7d4df
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2017-04-20 15:29:44 -04:00
Jonah Graham
4a7088a1c1 Bug 515430: Prevent assertion by checking for quick fixable set
Change-Id: Iea8ac8354b104cb272457b78d2bf1304bd69e065
2017-04-20 04:17:08 -04:00
Pierre Sachot
39fceeb18b Bug 514637. Fixed the runtime version to 3.8.0
Change-Id: Icb8b6dfefdb707eb5e2ba0e9e9469e3a9206e4f0
Signed-off-by: Pierre Sachot <sachot.pierre@laposte.net>
2017-04-20 04:07:11 -04:00
Pierre Sachot
6146025ab7 Bug 515249: Corrected icon display
Change-Id: I2e3ad02421da963ec8c75e4c6071d70c06e9a4ef
Signed-off-by: Pierre Sachot <sachot.pierre@laposte.net>
2017-04-19 13:20:43 +01:00
Jonah Graham
df26b628b7 Bug 515417: Disable intermittent testTypes_FriendClass
Manually testing this code shows it works, but this test fails
>50% of the time on Hudson causing significant numbers of
UNSTABLE builds.

Change-Id: Ie23e97e477d9b154ff33b38374bd257412241889
2017-04-19 13:09:26 +01:00
Felix Morgner
3cc96b5873 Bug 515383: Missing standard headers in file associations
The following standard headers were missing from the file associations:

  - cuchar
  - cstdalign
  - scoped_allocator
  - shared_mutex

Additionally, cinttypes is no longer (since C++11) a GCC extension

Change-Id: I1545257d7d934c970de4f2f45f4e15499cec3fd9
Signed-off-by: Felix Morgner <fmorgner@hsr.ch>
2017-04-18 15:56:44 +02:00
Jonah Graham
2e235b70e7 Bug 505743: Allow intermittent tests to try multiple times
Change-Id: Id925a2a3b10397a798035f8d03be34131c43ef00
2017-04-18 06:31:48 -04:00
Nathan Ridge
41b15da668 Bug 515068 - ClassCastException in CPPASTDeclarator.getExecution()
Change-Id: I8b4a9612b820dd8677b740479f774fb68620169c
2017-04-18 01:52:30 -04:00
Nathan Ridge
bddbdd2752 Bug 515066 - ArrayIndexOutOfBoundsException in CPPClassScope.markInheritedConstructorsSourceBases()
Change-Id: Id08fb0bb432fe6af02afabdcdde761016514db42
2017-04-18 01:51:12 -04:00
Jeff Johnston
795a90288b Bug 497670 - Support compiler provided "fix-it" hints
- add new FixitErrorParser that extends RegexErrorParser and is
  used to replace the error parser for GNUCErrorParser
- add new FixManager class to bind a fixit message with its
  problem marker
- modify ProblemMarkerFilterManager to register the last
  accepted ProblemMarkerInfo for a particular resource so
  the FixitErrorParser can find the last error marker for
  the file that precedes the fixit message
- FixitErrorParser looks for fix-it messages and binds them
  via FixitManager to the last error marker for the file
- add new Fixit class to contain the details of a gcc fix-it
- add new QuickFixForFixit which applies the gcc fix-it for the
  file
- add new (.*) regex in codan.ui.checkers patterns that will
  trigger before any other error and will look for the
  fix-it message format
- change cdt.core to expose cdt.internal.errorparsers to
  codan.checkers.ui
- change codan.core to expose codan.internal.core.model to
  codan.checkers.ui
- fix CDocumentProvider.setOverlay method to not overlay
  a CMarkerAnnotation that has a quick fix
- when deleting all C problem markers, also make a call
  to FixManager.deleteAllMarkers() so markers aren't
  left referenced

Change-Id: Ibf8ff7d8addb1bf092dc4ef35de0d92de0309589
2017-04-17 20:01:27 -04:00
Sergey Prigogin
908a609a53 Bug 514950 - NullPointerException running Organize Includes
Change-Id: Ic851d389a28e838775f20879bb88ffe00b9b55c0
2017-04-16 12:33:34 -07:00
Jonah Graham
593dc77b6d Bug 515307: Run test order of magnitude faster
The break inserter test was running all display events for 200ms after
each simulated keystroke, but all sideeffects were happening synchronously
or being placed on the event queue synchronously. So speed-up is achieved
by running event queue until empty instead of effectively sleeping for
200ms

Change-Id: Icffd4d5526176e596cf8ce3ac716a4ae88d51159
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
2017-04-15 03:44:40 -04:00
Jonah Graham
501fa87934 Bug 515101: Control folding on doc and non-doc comments
Change-Id: I77b5cc2209d52877318182009b4de8e9491a85f7
2017-04-15 01:14:52 +01:00
Jonah Graham
18a6002f07 Bug 515304: profiles to parallelize testsuite
Change-Id: I02095334c2176bfb9a2968d91b6175af37123f5b
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
2017-04-14 20:03:36 -04:00
Nathan Ridge
8b8ceed800 Bug 514821 - Attribute on enumerator
Change-Id: Icb9ff49c16b049fecb33a55e1db11b61f1efc2d9
2017-04-14 19:54:28 -04:00
Nathan Ridge
e42a75e3e5 Bug 514595 - Instantiate EvalConstructor.fType correctly
Change-Id: I7ee2c7ffee4b15f0005ddb8bcc5c9051992908d3
2017-04-14 19:52:45 -04:00