aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/3rdparty/cplusplus
Commit message (Collapse)AuthorAgeFilesLines
* CppEditor: Try harder to give the right language featuresChristian Kandeler2025-10-301-0/+7
| | | | | | | | ... to non-project sources. In particular, do not enable C++ features for C files. Change-Id: I334f4928768ef1f940cfc54dfc2891ffad1edbbc Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppEditor: Allow to generate function definition from friend declChristian Kandeler2025-10-071-0/+12
| | | | | | | | | | Due to implementation issues, we limit ourselves to unqualified names, which shouldn't matter much in practice (plus this is fringe functionality anyway). Fixes: QTCREATORBUG-31048 Change-Id: Ie2ad3268d15db59359bc83485ce48784ed29538c Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Merge remote-tracking branch 'origin/18.0'Eike Ziller2025-09-221-1/+1
|\ | | | | | | Change-Id: I4b2b47f6fa450c5f61be85418f918774b914ed1f
| * CPlusPlus: Support "typename" in template template parametersChristian Kandeler2025-09-171-1/+1
| | | | | | | | | | | | | | This is allowed in addition to "class" from C++17 on. Change-Id: Ib77ea503ecbcad187727d38c3f222ab5c043ea6b Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | CppEditor: Support parameter packs in refactoring operationsChristian Kandeler2025-09-183-4/+15
|/ | | | | | Fixes: QTCREATORBUG-32597 Change-Id: I8d6c9571f9a00ab36f09537a6be4a343b3fd9a84 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CPlusPlus: Fix parsing constant template parameters with default valueChristian Kandeler2025-09-031-1/+1
| | | | | | Task-number: QTCREATORBUG-22954 Change-Id: Iba42b7bf85e527e0569af5a4a0c08552882b358e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CPlusPlus: Fix "dot to arrow" completionChristian Kandeler2025-09-031-1/+1
| | | | | | | | Amends 96c5862c01b98cbdcbb2bb584773c10e10f5549d. Fixes: QTCREATORBUG-33445 Change-Id: I4c8267404ca1d5b7490244bebbf2fae074c0bd5e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CPlusPlus: Fix pretty-printing of constrained function parametersChristian Kandeler2025-09-013-2/+54
| | | | | | | | | | | | | | | This consists of three parts: 1) Fix parsing of contrained types. In a declaration func(MyConcept auto p); the parameter p was mis-parsed as a type name. 2) Properly handle the resulting AST so that a constrained parameter gets the right type. We re-use NamedType and combine it with the "auto" flag. 3) Teach the TypePrettyPrinter to handle such types. Task-number: QTCREATORBUG-33005 Change-Id: I2c6e3a64a2b9fb3d294a580fbc43ceb80f5d75e1 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppEditor: Consider trailing return types also in "insert definition"Christian Kandeler2025-09-011-1/+1
| | | | | | | | Amends b8144e0c51259994ea88bd1302776fced19a4755. Task-number: QTCREATORBUG-33005 Change-Id: I9423edb3a64035d17ef6eb663b6d44d9e631237e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CPlusPlus: Add null pointer checksChristian Stenger2025-08-291-2/+2
| | | | | Change-Id: Ic588084caaa6428e6ad57492e0a1ea6c48ba4377 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CppEditor: Fix pretty-printing of type constraint template parametersChristian Kandeler2025-08-292-28/+49
| | | | | | | | | | Note that this also affects other types of template parameters that we parse as type constraints, because we cannot tell them apart syntactically. Task-number: QTCREATORBUG-22954 Change-Id: I52971c4c6e1cf2eae362c746c71773c829127a67 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CPlusPlus: Teach the parser about __int128Christian Kandeler2025-08-285-0/+28
| | | | | | | | Otherwise, we stumble over header files where this built-in type is used in conjunction with unsigned. Change-Id: Ia3e0c31874901454ff70b3d541442975df66e238 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CPlusPlus: Add parser support for consteval-ifChristian Kandeler2025-08-284-2/+35
| | | | | Change-Id: I076989cc196124d8c75b80586f382a0b97956fd2 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CPlusPlus: Fix parsing simple template namesChristian Kandeler2025-08-281-0/+2
| | | | | | | | ... following a "template" keyword after e.g. a nested name specifier. We erroneously allowed only template ids there. Change-Id: I9981f6b67d1d3c2352482b880007cd099bbd6b7e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CPlusPlus: Add parser exceptions for built-in type traitsChristian Kandeler2025-08-282-2/+28
| | | | | | | | | | | | | In header files of compiler vendors, we find constructs such as this one: template<typename T> requires __is_enum(T) struct E {}; This is rightfully rejected by our parser, as non-parenthesised function calls are not allowed in a requires clause. However, as compilers apparently have special handling for these built-in type traits, we behave the same way as not to needlessly stumble over library headers. Change-Id: Ib3199711dab706b8e27412f91f16f95748a1e3bb Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CPlusPlus: Fix parsing the noexcept operatorChristian Kandeler2025-08-275-1/+18
| | | | | | | Amends 158b07c9c84c8bcd77620f36fe6f1e3eb8d7f224. Change-Id: I039c7b1ea80eb63928f4e53f45b3b4756d9c35b5 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CplusPlus: Add parser support for char8_tChristian Kandeler2025-08-271-0/+2
| | | | | Change-Id: I13534e9cc6dfc3ffd4dbff516f65f6b6d4aa6805 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CPlusPlus: Support placeholder type specifiers in return typesChristian Kandeler2025-08-271-17/+28
| | | | | Change-Id: I78c818dda319f160340c7d4014ccba3932f82619 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CPlusPlus: Support explicit object parametersChristian Kandeler2025-08-272-0/+5
| | | | | Change-Id: I9324ee2dbf34fc15ea4573a7c13359611b313f10 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CPlusPlus: Support fold expressionsChristian Kandeler2025-08-2710-4/+271
| | | | | Change-Id: Iaae3288e53c43f1fceac6d9cb8dd042fb3ae96ca Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CPlusPlus: Fix parsing of attributes appearing after an operator nameChristian Kandeler2025-08-271-0/+10
| | | | | Change-Id: Iff083edb79d83a1cea15b8f2f6fd8c0c97efc7b1 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CPlusPlus: Fix parsing of friend declarations with simple type specifierChristian Kandeler2025-08-262-6/+10
| | | | | Change-Id: I2b971cf0defcaf268fc2ed5742bb2f79e7b58022 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CPlusPlus: Add parser support for template deduction guidesChristian Kandeler2025-08-2611-4/+175
| | | | | Change-Id: Ia5c6be3b165dfde10653da8d8015f2893229e378 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CPlusPlus: Add null pointer checkChristian Stenger2025-08-261-1/+1
| | | | | | | Amends 197458af34babe8585cd9bfebc9ce5a10c2c52d2. Change-Id: I704c3f52aecac1942db31d0bdf2f9adf48c65640 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* CPlusPlus: Support the single-parameter variant of static_assert()Christian Kandeler2025-08-251-2/+4
| | | | | Change-Id: Icb7cdd88f7769948f1c25f9412f0c57d3e1a58d0 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CPlusPlus: Fix parsing a trailing requires-clauseChristian Kandeler2025-08-251-2/+2
| | | | | | | | The way that was implemented prevented it to appear in a defaulted or deleted function. Change-Id: Ie010569f8a045e149a4763816baa7192afc760de Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CPlusPlus: Fix parse error in requires-clauseChristian Kandeler2025-08-251-1/+2
| | | | | Change-Id: I19689ce5745c8bc33b70af27bda2e21c2145372b Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CPlusPlus: Create declarations for conceptsChristian Kandeler2025-08-202-0/+13
| | | | | | | So that symbol look-up will work on them. Change-Id: I2cd598a46156c22313588ccfe33dbf5d000168f5 Reviewed-by: hjk <hjk@qt.io>
* Fix leaks in CPlusPlus autotestsChristian Kandeler2025-08-182-3/+7
| | | | | Change-Id: I4da9e96fea421f8aa4b6c6d1ffba8eb63930d4a7 Reviewed-by: hjk <hjk@qt.io>
* CPlusPlus: Fix backtracking when parsing template declarationsChristian Kandeler2025-08-131-1/+4
| | | | | Change-Id: Ia042d5299e50a619a5bd5c47d71089726bc5ec9b Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CPlusPlus: Fix parsing compound requirementsChristian Kandeler2025-08-131-0/+3
| | | | | | | The "->" part was forgotten. Change-Id: I507e06607d08dd69673f890b9530e8dda1a37952 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CPlusPlus: Support specifying base classes via decltype()Christian Kandeler2025-08-135-8/+32
| | | | | | | This has been allowed since C++11. Change-Id: Idb88fea4e0b196902412f684780bb7caf2301873 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppEditor: Add proper support for template template parametersChristian Kandeler2025-08-123-13/+17
| | | | | | Fixes: QTCREATORBUG-17695 Change-Id: Ib040155504c2af824b5afd0bedc934c8e525c27c Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CMake: Use absolute dir attribution file pathsAlexandru Croitor2025-08-121-1/+1
| | | | | | | | Makes it less error prone than using relative paths. Task-number: QTCREATORBUG-31681 Change-Id: Ia7dbb79008139663a932369d4e2273680d8aa52b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CppEditor: Add proper support for defaulted and deleted functionsChristian Kandeler2025-08-065-0/+26
| | | | | | Fixes: QTCREATORBUG-26090 Change-Id: If9946b5b635ba224abd0471f44e2223cf6fa030f Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppEditor: add Token::isRawStringLiteral convenience functionDavid Schulz2025-07-231-0/+3
| | | | | Change-Id: I8b5d65ca781d4b7d2ee1ba4d9195c8c606b661e0 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CMake: Annotate attribution json files to targets that use themAlexandru Croitor2025-07-231-0/+7
| | | | | | | | | | | | | Otherwise the attribution file info is not included in the generated SBOM. For bundled 3rd party libraries, also specify the sbom entity type to clearly mark them as 3rd party libraries. Task-number: QTBUG-129609 Task-number: QTCREATORBUG-31681 Change-Id: Ia31fb0ae89288acd95ecd259d77719f2501be9ff Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Utils: make Text::positionInText column 0-basedDavid Schulz2025-06-251-2/+2
| | | | | Change-Id: I29fead673972348428695918a5c57535b2f243a7 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CPlusPlus: Fix warnings about unused variablesChristian Kandeler2025-04-171-48/+44
| | | | | Change-Id: I519d95c0b73125c5bef875826f48f3211430c5bc Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* fix:ParseTranlationUnit is misspelledTian Shilin2025-02-282-3/+3
| | | | | | | Spelling mistakes this can lead to confusion. Change-Id: I25845911e4cbd670ea3b5e02dd4ae27542a67ff2 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CPlusPlus: Properly initialize a class memberChristian Kandeler2025-02-211-1/+1
| | | | | | | | Otherwise, e.g. visitors might crash. Amends ed92c2d948fbd6dcaf279f99d06c3f4ac94f24e0. Change-Id: Ic60e6ed7f76a3ba966c4e176ae94801b9ab74554 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CPlusPlus: Store concept name as QualifiedNameASTChristian Kandeler2024-12-106-14/+4
| | | | | | | | | This simplifies the code and improves handling of nested template type parameters in some contexts. Fixes: QTCREATORBUG-32079 Change-Id: Ifb28fc19ab3cb1747df097589027bb8e33cf037a Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Merge remote-tracking branch 'origin/15.0'Eike Ziller2024-12-022-11/+15
|\ | | | | | | Change-Id: I13e6beb4741be5aa79b2798aa6b674e45ad109f2
| * CPlusPlus: Add missing error check to parseExpressionStatement()Christian Kandeler2024-11-292-11/+15
| | | | | | | | | | | | Fixes: QTCREATORBUG-32043 Change-Id: Ic4f1716339d1277d0a2d5a237fd6ae0389ed2485 Reviewed-by: hjk <hjk@qt.io>
* | CppEditor: Add support for refactoring classes with conceptsMasoud Jami2024-11-1211-9/+73
| | | | | | | | | | | | | | | | | | | | | | | | Add support for concepts that are used in class declartions by differentiating between "typename" template parameters and concepts. With this new patch it's possible to move (refactor) a member of a class that uses concepts to a cpp file, while respecting the concept definition. Fixes: QTCREATORBUG-31214 Change-Id: Id3e6f978e688c58c7291926823d5bddaaa587f60 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge remote-tracking branch 'origin/15.0'Orgad Shaneh2024-11-073-4/+8
|\| | | | | | | Change-Id: Icd59b4850b51b6cef1753e0ba638ac25d07e6e99
| * CppEditor: Fix leaksChristian Kandeler2024-11-063-4/+8
| | | | | | | | | | Change-Id: Ica249743391739b3cc75023dc4c1ad72ab73bd45 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | CPlusPlus: Add support for init statements in range-based for loopsChristian Kandeler2024-11-066-0/+37
|/ | | | | | Fixes: QTCREATORBUG-31961 Change-Id: I2002c0248e8f853ba5dae555b6a4cf9f6e91af9c Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Merge remote-tracking branch 'origin/14.0'Eike Ziller2024-08-092-11/+10
|\ | | | | | | | | | | | | | | Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs Change-Id: I00c2cdccf7f2fa9203d1018e90511133b2e08310
| * CPlusPlus: Allow empty initializer lists in placement newChristian Kandeler2024-08-081-1/+1
| | | | | | | | | | | | Fixes: QTCREATORBUG-30798 Change-Id: Ib9945e4e721aca5f88665bd8a289ae3c54c69e65 Reviewed-by: Christian Stenger <christian.stenger@qt.io>