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

11935 commits

Author SHA1 Message Date
Sergey Prigogin
db22538a25 Added a @Deprecated annotation. 2013-12-21 10:13:39 -08:00
Nathan Ridge
c1b801b036 Bug 332829 - Handle ambiguity between a type-id and an expression other
than an id-expression in a template argument

Change-Id: I1ec6157b09526a1f98850361f903fbea8b8c8a89
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
Reviewed-on: https://git.eclipse.org/r/20140
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-12-21 13:04:43 -05:00
Marc-Andre Laperle
9e3bca14b5 Bug 353281 - Content assist for designated initializers, additional fix
Change-Id: I534f074f1308f03f341838c87096ef09e3c166a2
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/20094
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Hudson CI
2013-12-20 20:33:20 -05:00
Sergey Prigogin
ef93400be2 Cosmetics. 2013-12-18 14:08:46 -08:00
Sergey Prigogin
240a5ac13e Bug 424378 - __is_final GCC built-in type trait is not supported 2013-12-18 12:32:44 -08:00
Sergey Prigogin
bff4a3bf6c Cosmetics. 2013-12-18 12:27:03 -08:00
Nathan Ridge
e0d1910ed4 Bug 420995 - Specializations of constexpr functions
Change-Id: I7e08e21eb62867d6bb42aa6904ab0fab472cb0bc
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
Reviewed-on: https://git.eclipse.org/r/19936
Tested-by: Hudson CI
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-12-18 14:29:16 -05:00
Sergey Prigogin
227b03e6b8 An attempt at performance optimization.
Change-Id: Ia4b6839626381935af859ae468de418fa004c867
Reviewed-on: https://git.eclipse.org/r/19934
Reviewed-by: Nathan Ridge <zeratul976@hotmail.com>
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-12-18 12:40:39 -05:00
Nathan Ridge
d9c4584257 Bug 395074 - NPE in EvalFixed.<init>
Change-Id: I2457557add26e0121bd974fcc954ed879a8e8cf4
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
Reviewed-on: https://git.eclipse.org/r/19932
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-12-17 23:29:05 -05:00
Sergey Prigogin
bb6d85dbd0 Bug 419301 - Operator overloading confuses CDT (with boost)
This restores commit ebc858ec44.
2013-12-17 19:36:44 -08:00
Nathan Ridge
a7e2467ba5 Bug 419301 - Remove stray friend functions from lookup results
Change-Id: I69f79de6f38226aeceb0dfecb22ae43193c8c696
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
Reviewed-on: https://git.eclipse.org/r/19890
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-12-17 22:30:56 -05:00
Sergey Prigogin
4cfdc239bc Adjusted JavaDocs. 2013-12-17 12:40:46 -08:00
Sergey Prigogin
e622794f73 Revert "Bug 419301 - Operator overloading confuses CDT (with boost)"
This reverts commit ebc858ec44.
2013-12-16 16:23:51 -08:00
Uwe Stieber
e72c037dbd Bug 419391 - Contribute Windows PTY support
Signed-off-by: Uwe Stieber <uwe.stieber@windriver.com>
2013-12-16 09:54:34 +01:00
Nathan Ridge
ebc858ec44 Bug 419301 - Operator overloading confuses CDT (with boost)
Change-Id: I9f136577e8e64227d024ba6544017439f1ed2260
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
Reviewed-on: https://git.eclipse.org/r/19833
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-12-16 01:34:04 -05:00
Nathan Ridge
dd7dde956f Bug 417700 - Semantic Error: Invalid overload of 'endl' for a templated
parameter

Change-Id: Icd110a386421d9d5cc9502dd8d4cd56328119a77
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
Reviewed-on: https://git.eclipse.org/r/19834
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-12-16 00:55:50 -05:00
Nathan Ridge
d96ec1dfc8 Bug 422505 - Additional fix for unqualified case
Change-Id: Ia2a154c789d1b46643a67958611589e900ae0f18
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
Reviewed-on: https://git.eclipse.org/r/19826
Tested-by: Hudson CI
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-12-16 00:43:19 -05:00
Nathan Ridge
7f3095be51 Bug 422505 - Name resolution problem with template friend method
Change-Id: I1cb70755042572272cb38382795caa98f9d463ff
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
Reviewed-on: https://git.eclipse.org/r/19825
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-12-16 00:41:35 -05:00
Nathan Ridge
c126fade3d Bug 419938 - [fp] Pure virtual implementation not recognized if only one
path implements it

Change-Id: I90732a87d8d6b4ad2a84aa3c8b09b10727afa994
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
Reviewed-on: https://git.eclipse.org/r/19823
Tested-by: Hudson CI
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-12-16 00:40:02 -05:00
Sergey Prigogin
09773cc341 Added JavaDoc for BaseTestCase.INDEXER_TIMEOUT_SEC. 2013-12-15 10:57:16 -08:00
Nathan Ridge
48d5341bf7 Bug 401820 - Explicit specialization of template declared in header
Change-Id: Ibf2156f880d42e87b1d954772b0faae384f9784b
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
Reviewed-on: https://git.eclipse.org/r/19742
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-12-15 02:12:57 -05:00
Marc Khouzam
7bbbbcf7a8 Missing @since tag
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2013-12-12 16:15:02 -05:00
Andrew Eidsness
1b42998e47 Bug 422841: Add IQMethod to the QtIndex
This adds support for Qt slots, signals, and invokables to the QtIndex.

This does not yet generate PDOM references for QObject::connection
function calls and the Content Assistant is not contributed yet.

This also fixes a problem in the GNUCPPSourceParser class (internal to
cdt.core).  The class has a protected method that accepts an inner enum
as a parameter.  That enum was marked as private, meaning the method
could not actually be used by subclasses.  I've updated the enum to
match the visibility of the method.

There are three big areas needed to support Qt methods:

1) Slot and signal regions must be identified in the C++ class
definition.  These regions are introduced with special macros and the
region extends to the next region or to the next visibility label.

   Single methods can also be marked with (different) special macros.
This only applies outside of a slot/signal region.

   I've created QtASTClass which examines the input class spec in order
to identify all such regions.  This information is used when creating
the QtPDOM nodes for these methods.

2) Some places in Qt use type information embedded as macro expansion
parameters.  The values are lost by the standard C++ parser (since they
are just text in the expansion).  I've added an extension to the
GNUCPPSourceParser that accepts an input string (the macro expansion
parameter) and produces an appropriate IASTNode if possible.

3) The Qt moc follows specific and non-standard rules when matching
method signatures inside of QObject::connect function calls.  I've added
a utility that creates the same signature using the CDT AST as input.

   I learned the rules used by the moc by observing it's output for
significant cases.  Those cases have been put into a test case that is
included in this patch.

Change-Id: If812558db315abec637653cc974abf1c0c13d95b
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/19672
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
2013-12-11 20:59:16 -05:00
Sergey Prigogin
2e0bd2e95b Added ICElement.EMPTY_ARRAY constant. 2013-12-11 15:29:22 -08:00
Sergey Prigogin
bdde88fd2a Cosmetics. 2013-12-11 15:28:58 -08:00
Marc-Andre Laperle
431dff5671 Bug 421289 - Preferences for indexing all versions of all or specific
headers

Change-Id: If0788d35af7aea0f95ffbff10b4e5d1b9f30ba62
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/19033
Tested-by: Hudson CI
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-12-10 14:48:56 -05:00
Marc-Andre Laperle
3c01b0d5f1 Bug 423396 - Indexer can't evaluate operator value
Change-Id: I8edcc66e24c95d4fb0113df8a7f0c21cbf378155
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/19482
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-12-09 14:34:00 -05:00
Sergey Prigogin
498762b021 Code streamlining. 2013-12-06 12:47:28 -08:00
Sergey Prigogin
b40827283d Cosmetics. 2013-12-06 12:17:26 -08:00
Sergey Prigogin
ecf7d25dd9 Cosmetics. 2013-12-06 12:01:12 -08:00
Sergey Prigogin
1a4e509e0d Bug 423471 - ClassCastException in CPPASTTemplateIDAmbiguity 2013-12-06 11:38:43 -08:00
Sergey Prigogin
aa9dd95996 Cosmetics. 2013-12-06 11:28:24 -08:00
Sergey Prigogin
ff49775235 Bug 400073 - More robust clearing of results cache. 2013-12-06 11:16:59 -08:00
Sergey Prigogin
3fbe0d12af Bug 400073 - Indexer runs out of memory.
Fixed a soft memory leak caused by accumulation of data in
PDOM.fResultCache when several consecutive files fail to parse.
2013-12-05 20:40:15 -08:00
Sergey Prigogin
2668018f30 Fixed a warning in Codan. 2013-12-05 18:25:04 -08:00
Andrew Eidsness
4dab99404c Bug 422681: Load the correct binding for cross-linkage references
The test case in the previous commit was invalid.  The test case did not
modify the binding that was referenced by the name and it was checking
for the wrong binding after reading the reference from the Database.
Further, the test case had a hole where the type of binding that was
being used happens to have same node type in both the C and C++
linkages.

I've fixed the test case as follows:

1) The test type is now an enum which has a different nodeType in the C
and C++ linkages.  The test case will now be able to catch cases where
the wrong linkage is used when reading the binding.

2) The test case now changes the name to reference a binding in a
different linkage.  This means the later code (in the test case) is
expected to actually load a binding from a different linkage.

3) The test case now checks that the loaded binding really did come from
the other linkage.  The previous implementation of the test case was
using the wrong binding for the checks.

I've also updated the implementation so that the updated test case
passes.

As an aside, during this update we (Doug and I) noticed that PDOMNames
unnecessarily store a PDOMLinkage.  Bindings come from languages, and
therefore need a PDOMLinkage (so that the proper type can be loaded).
Names reference bindings and therefore should not have a linkage.  The
motivating example is that there should be one binding for the printf
function, but it could be referenced using names that are created by
different parsers.  This can be fixed in a later change.

The major change to implementation is that PDOMNode now stores an
identifier for the factory to use when loading the node.  PDOMNode was
already using an int to store the nodeType.  I've split this to store
the factoryId as a short and the nodeType as a short.  The highest
nodeType currently in use is 58 -- a short should provide ample room for
expansion.

Since PDOMNode is now able to pick the proper factory for loading, we no
longer need the PDOMLinkage.getNode(long) method and I've marked it
deprecated.  Instead there is a new method PDOMNode.load(PDOM, long).
Nodes read their factoryId from the database, so the PDOMLinkage is not
needed.

Later commits should cleanup the following:

    a) Remove PDOMLinkage from PDOMNode (and related)
    b) Change return type of PDOMNode.getNodeType to short
    c) Replace deprecated calls to PDOMLinkage.getNode

Among these changes, (a) should allow removal of the external references
list.  If names can be loaded without a linkage, then there would be no
reason to store the linkage when storing the name.

Change-Id: Ife2b21cb21ed1ac6d6c361d0ffb8c7434832c79c
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/19377
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
2013-12-05 13:39:03 -05:00
Sergey Prigogin
424c2898fe Bug 423127 - Template resolution gets confused by "void" in a parameter
list

Change-Id: I6d2510ce7f1c8007da7121855bc4870e4a57d15d
Reviewed-on: https://git.eclipse.org/r/19355
Tested-by: Hudson CI
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-12-05 00:54:07 -05:00
Sergey Prigogin
ff8baa2754 Cosmetics. 2013-12-04 19:46:34 -08:00
Sergey Prigogin
5adfb67a9d Added toString method. 2013-12-03 18:18:50 -08:00
Sergey Prigogin
772f6c1643 Bug 423126 - Extract Function refactoring misses additional occurrences
of the extracted code
2013-12-03 18:16:43 -08:00
Sergey Prigogin
090345f405 Cosmetics. 2013-12-03 18:05:48 -08:00
Sergey Prigogin
bd0e88a3e2 Code streamlining. 2013-12-03 17:31:52 -08:00
Sergey Prigogin
3a7a88486b Cosmetics. 2013-12-03 17:29:36 -08:00
Marc-Andre Laperle
0071f546d1 Bug 418770 - NPE in EvalBinding.getBinding involving specialized enum
Change-Id: Ibbf3c1dd40e3e33a111c5d3a433277a1349dd445
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/19031
Tested-by: Hudson CI
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-12-02 09:52:45 -05:00
Sergey Prigogin
8852f2d73e Cosmetics. 2013-11-30 23:10:58 -08:00
Sergey Prigogin
772066afce Bug 422727 - Extract Function doesn't properly handle auto types 2013-11-30 22:39:34 -08:00
Sergey Prigogin
eb421c9fec Removed public visibility from DialogMessages class. Externalized
strings were never intended to be a part of the public API.
2013-11-30 22:34:35 -08:00
Sergey Prigogin
a9f9839cc9 Added @noreference tag to logging methods. 2013-11-30 22:14:14 -08:00
Sergey Prigogin
c9909363f9 Cosmetics. 2013-11-30 22:09:42 -08:00
Andrew Eidsness
fccbec7b0d Bug 422841: Initial implementation of QtIndex
This uses the new PDOMASTProcessor extension point to create a
Qt-specifc PDOMLinkage.  This initial version of the linkage only stores
QObjects and their base classes.  Later commits will fill out other
details and introduce classes that use this data for things like Content
Assistance and Codan checking.

This patch introduces the following:

1) QtIndex: This is an index that provides access to Qt-specific data.
The index is mostly a wrapper on the CDT's existing IIndex, but it
provides very specific information about the Qt elements.  The only data
that can be accessed from the QtIndex (in this patch) is a QObject and
the QObject's that appear in its base class specifier list.

2) QtPDOMLinkage: This linkage is implemenated as an extension of the
PDOMCPPLinkage.  In some cases it adds references to Qt names from the
C++ bindings.

3) Test suite: The test suite has some base classes for parsing the Qt
source code.  The only test case is for the simple functionality that is
being added in this patch -- examining the base class specifier list of
QObjects.

These areas will be extended in later patches.

Change-Id: I13fb83beb7f50cd2efb1de97b562245dc642468d
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/19113
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
2013-11-29 14:43:41 -05:00