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

13984 commits

Author SHA1 Message Date
Thomas Corbat
65eda42b16 Bug 518628 Function declarator location misses virtual specifiers
- Change parser to include virtual specifier in function declarator
location
- Change DeclaratorWriter to write all virtual specifiers in their
initial order

Change-Id: Iff381394b834146c1b63877bc9eb84517d31e078
2017-06-22 07:48:33 -04:00
Nathan Ridge
bd4656755c Bug 516338 - Avoid calling instantiateType() on arguments of non-dependent template instances
Change-Id: I51628e9b6ca569943879f48d4c0d0b740bdc23b8
2017-06-20 02:34:07 -04:00
Nathan Ridge
1dceabb0eb Bug 516338 - Detect substitution failure during instantiation of dependent alias template arguments
Change-Id: Ia97e0632e17b4047a0fe35c05be72dab75e43d5c
2017-06-20 02:34:07 -04:00
Nathan Ridge
e374b4b08e Bug 516338 - Have ICPPAliasTemplateInstance implement ICPPTemplateInstance
This allows querying alias template instances for their arguments (for
e.g. instantiating dependent arguments later).

Change-Id: I7cc3dfcef75fe0faf104dc7bfe11e2acd90a4748
2017-06-20 02:34:07 -04:00
Nathan Ridge
8d6cab41e7 Bug 516338 - Introduce alias template specializations
We previously modelled alias template specializations as alias template
instances, which was conceptually incorrect and problematic for a number
of reasons.

Change-Id: Ibca8b87bb3d54cd3ae312254a02e8522e446331d
2017-06-20 02:34:07 -04:00
Nathan Ridge
3e0853ae0c Bug 516338 - Improve typedef preservation
Besides the UX advantages of typedef preservation (such as refactorings
preserving typedefs), it's important for correctness because the
arguments of template aliases can be subject to SFINAE even if they
don't participate in the target type.

Change-Id: I4e71372553dc418d1b8c3e27bd2c0387a41a3269
2017-06-20 02:34:06 -04:00
Nathan Ridge
c24e5d17b3 Bug 517954 - ClassCastException in CVisitor.findBindingsForContentAssist()
Change-Id: I0780b422ee727def577f78ed600f66a3ef4728d0
2017-06-08 02:57:45 -04:00
Nathan Ridge
5f937c0bf8 Bug 516648 - Delay storing of the type, exception specification, and parameters of a function specialization in the index until the post-process
This is needed to avoid infinite recursion, and mirrors the way regular
functions are stored.

Change-Id: I72d0c9fb1567cb9d2ba8922d38e17ec63e1fe97a
2017-06-04 18:29:00 -04:00
Doug Schaefer
0084cc2707 Bug 510987 - Properly support PIE executables as build output
When checking whether gathering the build output from a
CBuildConfiguration, if a binary is a shared library and is an
ELF file, dig deeper and see if it has an INTERP section in the
program header. That tells us it's actually a PIE executable and
add it to the list.

As a rider to this bill, improve the error message when a Qt install
can't be found for a given toolchain/target.

Change-Id: I8fd0bf2d204e9425b02916d7b17f4309a5ad9dd5
(cherry picked from commit 14b07f490c)
2017-06-02 12:08:10 -04:00
Doug Schaefer
d3dcd92d8f Bug 517581 Keep env var operation on merged vars the same.
If we are merging two env vars and the operations are both
append or prepend, keep that as the operation instead of
replace.

Change-Id: I758a54b8903eabafac38bf2f3f7d7065c0373e70
2017-05-31 13:07:37 -04:00
Doug Schaefer
63ff83042b Bug 447703 Build Console on top to true by default.
This matches the behavior of every other console provider
I've seen.

Change-Id: I0f1cdb22401bd7e204988df860854956fc57dde4
2017-05-31 11:26:44 -04:00
Marc-Andre Laperle
35d0e13240 Bug 514459 - StackOverflow in PDOMCPPVariable.getInitialValue
Change-Id: Iaee32f03a4fa821979fca1e1ca7b2b272bac1737
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2017-05-26 11:47:09 -04:00
Nathan Ridge
4412c851ab Bug 516686 - ArrayIndexOutOfBoundsException in CPPASTLiteralExpression.computeStringLiteralSize()
Change-Id: I45ce05315c57847bf8ae784b2fe7569a72716894
2017-05-25 20:52:22 -04:00
Nathan Ridge
b0cfef83db Bug 516685 - ClassCastException in CPPTemplates.createInstance()
Change-Id: I9b4ca25afa60a6ed3a79411cc5daa27add3e9cba
2017-05-25 20:51:01 -04:00
Nathan Ridge
3147cc4732 Bug 516627 - Add support for generic lambdas
Change-Id: I2e8d16cfe2dc58b77e36fa7a6957506c90b7e75a
2017-05-22 13:39:55 -04:00
Nathan Ridge
f579acd381 Add some more commonly used types to SemanticTestBase.CommonCPPTypes
Change-Id: Ifec1e26f9e5a31651229e50002dfcb2d67b1379d
2017-05-22 13:39:29 -04:00
Nathan Ridge
9aa8aca96b Factor out an AST2CPPTestBase base class for C++ AST2 tests
Change-Id: I923fa1559a0cca584ff3a601d59ac71c0e491c49
2017-05-22 13:38:53 -04:00
Jonah Graham
b48696a6ea Bug 314428: add missing copyright header and format file
Change-Id: I79883240c004485787879383ee29663444ccf8ba
2017-05-17 13:39:47 +01:00
Felix Morgner
ca1ab7f52d Bug 491957. Preferences & save action for choosing const alignment
Conflicts:
	core/org.eclipse.cdt.core/META-INF/MANIFEST.MF
	core/org.eclipse.cdt.core/pom.xml
	core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/TextTestSuite.java
	core/org.eclipse.cdt.ui/pom.xml

Change-Id: I061fa28d2e0b37f6d00232ad619f23b892e13ce6
Signed-off-by: Mario Meili <mmeili@hsr.ch>
Signed-off-by: Benny Gaechter <benny.gaechter@hsr.ch>
Signed-off-by: Felix Morgner <fmorgner@hsr.ch>
2017-05-15 02:59:54 -04:00
Nathan Ridge
619da2a170 Bug 408470 - Add partial support for C++14 return type deduction
Out-of-line definitions where the definition is in a different file
than the declaration are not supported yet.

Change-Id: I3631bdb3e08abe2aab266065c7858c66170fb570
2017-05-14 13:48:36 -04:00
Nathan Ridge
fb847a82ce Bug 408470 - Introduce SemanticTestBase to serve as a common base class for AST and index tests
This allows reusing more code, such as CommonCPPTypes and
BindingAssertionHelper, between the two test suites.

Change-Id: I8203191fc3a10565add0ae1bd25c98f743cd1e64
2017-05-14 02:08:24 -04:00
Nathan Ridge
4e760d8690 Bug 408470 - Define some more common C++ types in AST2TestBase
Change-Id: I794439a2d68f7b744afdef80b1f92a09996f95d2
2017-05-14 01:41:52 -04:00
Nathan Ridge
08ea44c0af Bug 408470 - Move the variable template tests into the new cxx14 subpackage
Change-Id: I45a598d6cf920860a6f08d25e8921cbf310734a8
2017-05-14 00:29:08 -04:00
Nathan Ridge
1f2198a8bf Bug 408470 - Move C++14 constexpr tests into cxx14.constexpr subpackage
Change-Id: If9ac633020e568a0e4218a2ad358ee21eb1cffd7
2017-05-13 23:43:31 -04:00
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