aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/3rdparty
Commit message (Collapse)AuthorAgeFilesLines
* Utils: add has_value to optionalDavid Schulz2018-05-161-1/+3
| | | | | Change-Id: I73af682c98d3fd9e97c169ffb3930950e2b0addb Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* CPlusPlus: Fix some crashhjk2018-05-161-0/+3
| | | | | Change-Id: I8b98d86e7d5321e2420d388abba159474d7ad799 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* TextEditor: Highlight punctuators as TextHugo Holgersson2018-05-032-13/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change limits the set of tokens that fall under Token::isOperator(). That allows cpphighlighter.cpp to distinguish operator tokens from punctuator tokens (without changing any logic in cpphighlighter.cpp). This change moves punctuators from "Operator" to the "Text" style category where they belong. Punctuators are not operators. Punctuators are dumb text tokens. Why don't we let the clang backend alone separate these tokens for us? 1. Clang is slow on big files. Sometimes the highlighting dictated by clang is painted _seconds_ after cpphighlighter.cpp runs. CppHighlighter is way faster so we use it to "prepaint" code while clang is busy in the background. 2. Secondly, clang cannot yet handle all operator types. In particular, none if its "operator cursors" CXCursor_UnaryOperator: CXCursor_BinaryOperator: CXCursor_CompoundAssignOperator: CXCursor_ConditionalOperator: includes the -> and . operators. We still need CppHighlighter to paint those tokens. However, once clang has finished processing the file some operator tokens will be repainted. We need clang to get all operators' semantics. In particular, we need clang to tell us if < is a "smaller than"-operator or part of a template parameter like set<int>. Task-number: QTCREATORBUG-19659 Change-Id: I952cb58f7c79134b3281e2a8221425cc1d0ad263 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Utils: Purge qtcfallthrough.hOrgad Shaneh2018-04-091-2/+0
| | | | | | | No longer needed. Change-Id: I9b0bee014df89d4c567f1d2431b5ff9404f5f925 Reviewed-by: hjk <hjk@qt.io>
* Add support for nested namespaces (C++17)Colin Duquesnoy2018-02-092-2/+24
| | | | | | Task-number: QTCREATORBUG-16774 Change-Id: I3de3ac65810213e21c9a3bafef2474d252e191f7 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CPlusPlus: Add toLink method to the SymbolIvan Donchevskii2018-02-072-0/+20
| | | | | | | | Basically move it from CppTools to CPlusPlus to be able to use it there. Change-Id: I0af80f93bdc029824397ceafdf940cb86c4382b0 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Introduce Q_FALLTHROUGH()Friedemann Kleint2018-01-241-4/+4
| | | | | | | Silence g++ 7.X warnings. Change-Id: I9d06d04b496c9ec060e13e1be6f43d8fbadb1f3b Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Sqlite: Upgrade SqliteMarco Bubke2018-01-163-20148/+72591
| | | | | | | | We will use the new JSON extension to save structured data in the symbol database. Change-Id: Ife4b36d99e550a9f19f293a221cf94d5e98d5286 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Add implementation of std::variantEike Ziller2017-12-213-0/+2517
| | | | | | | Type-safe unions for C++. Change-Id: I3c1eb89a240a11d27b07acae588a924a0618173e Reviewed-by: hjk <hjk@qt.io>
* Merge remote-tracking branch 'origin/4.4'Eike Ziller2017-09-251-6/+10
|\ | | | | | | Change-Id: I7bf72444b19db20fcc7dc2c9d1f02ec2b30b658f
| * C++: Fix crash with invalid raw string literalNikolai Kosjar2017-09-201-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While parsing a document Bind::asStringLiteral() Token::spell() was called for a raw string literal token with a Token::literal nullptr. This is due scanRawStringLiteral() not properly aborting for invalid/incomplete code and that the code paths handling multi-line-raw-strings were not limited to the highlighting case. Address both cases. Task-number: QTCREATORBUG-18941 Change-Id: I489d288ccbd7b59be396dada846613ff555436cf Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* | Merge remote-tracking branch 'origin/4.4'Eike Ziller2017-09-192-3/+7
|\| | | | | | | | | | | | | | | Conflicts: src/plugins/debugger/debuggerdialogs.cpp src/plugins/debugger/gdb/remotegdbserveradapter.cpp Change-Id: I1ae77869887a8d9ef2a33439f2733315db9e0cf0
| * CPlusPlus: Avoid nullptr accessNikolai Kosjar2017-09-131-1/+5
| | | | | | | | | | | | | | Task-number: QTCREATORBUG-18903 Change-Id: I852b5de453d44c16adffd44c89900cfb8c3cc522 Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
| * C++: Fix highlighting of "float" keyword for C filesAndre Hartmann2017-09-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | ... in the Classic Code Model. Broken by 0d1fef41f76c04ede629406b6d15847c453f6d96 Task-number: QTCREATORBUG-18879 Change-Id: I7d0222cc81e8847827af042e89d3b75c57f5d454 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* | Merge remote-tracking branch 'origin/4.4'Eike Ziller2017-07-288-13/+98
|\| | | | | | | | | | | | | | | | | Conflicts: qbs/modules/qtc/qtc.qbs qtcreator.pri src/plugins/qbsprojectmanager/qbsproject.h Change-Id: I6b9cdf704be95ade02488c8b19582b6621282fb8
| * C++: Delete empty source fileOrgad Shaneh2017-07-262-3/+0
| | | | | | | | | | Change-Id: Ib86e09d6d516b175e715725fa9b60d7ae2626ff8 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
| * C++: Re-add Roberto's license header to files without oneOrgad Shaneh2017-07-265-0/+96
| | | | | | | | | | | | | | | | | | | | Nokia's license header was removed in b342ad8cf4322557fde8bc50529813a7c84ca067, but these files didn't have the second license header that was supposed to remain. Change-Id: Ib9977a3127fd48197a1a02982e7563c486bfca3a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
| * Replace include guards with #pragma onceOrgad Shaneh2017-07-262-10/+2
| | | | | | | | | | Change-Id: Icce9d191cc6cae89baf973e949dc0757d318d6ea Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* | Merge remote-tracking branch 'origin/4.4'Eike Ziller2017-07-181-1/+3
|\| | | | | | | Change-Id: I778acc044ac105a11054b314aecac5b1c2cfee6a
| * Add Q_FALLTHROUGH for Qt < 5.8Christian Kandeler2017-07-171-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and make use of it. With gcc 7, the new option -Wimplicit-fallthrough is introduced and added to the -Wextra set, triggering dozens of warnings in our sources. Therefore, we annotate all obviously intended fall-throughs. The ones that are still left are unclear and need to be checked by the respective maintainer. Change-Id: I44ead33cd42a4b41c28ee5fcb5a31db272710bbc Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | C++: fix lookups for functions with const argsIvan Donchevskii2017-07-111-1/+15
|/ | | | | | | | | Make declarations equal in case they differ only by argument const and/or volatile (13.1.3.4). Task-number: QTCREATORBUG-18475 Change-Id: Id0561fda3b9081b92716a8739ba9963e90b5d709 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* C++: Use #pragma once in cplusplus-update-frontendOrgad Shaneh2017-06-301-4/+1
| | | | | Change-Id: Ie4821a04706ee55b4ec17cf73356c15c333b3324 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Optional: add reset()Eike Ziller2017-06-191-0/+2
| | | | | | | It is part of C++17 Change-Id: I2aa4a11133a3d77644f4819492623c8e424ccd59 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Add std::experimental::optional as Utils::optionalEike Ziller2017-06-167-0/+2650
| | | | | | | | | Uses the reference implementation of the proposal, which later can be replaced by the std lib implementation depending on compiler and used C++ version. Change-Id: I23f2f8077f4cb26c3d9a403b1ce438b6cdb163f2 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* C++: fix code completion of stl containers in internal code modelPrzemyslaw Gorszkowski2017-06-151-5/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fix makes some trick and replaces existing typedef of 'pointer' to the simplest one(only in class unique_ptr), e.g.: template <class _Tp> class unique_ptr { typedef some_strange_things pointer; pointer operator->(); } is replace with template <class _Tp> class unique_ptr { typedef _Tp* pointer; pointer operator->(); } In most of the implementation of unique_ptr it should work. Similar approach is done for std::list, std::vector, std::queue, std::set, std::multiset, std::unordered_set. It is done in this hacky way to omit problems with cyclic and complex resolving of typedefs. Change-Id: I1363dfc5e23d3cd2fa7af7fc27423bfbac2d894d Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Merge remote-tracking branch 'origin/4.3'Orgad Shaneh2017-06-021-1/+1
|\ | | | | | | Change-Id: I56004e3ec9dc9d92d33bdae438c4f7e069eccc45
| * C++: Initialize BaseClass::_isVariadicRobert Loehning2017-06-011-1/+1
| | | | | | | | | | | | Change-Id: I35fa5c9cbc1aa2b5ed46c6e1c0c003fd81bcc1dd Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de>
* | Botan: Fix various bugs found by Coverity scannerRobert Loehning2017-06-022-12/+30
| | | | | | | | | | | | | | Backported from upstream 9b74862771aff940361078533cca5b5e78bdf630 Change-Id: I9c457cfa19bd3b6d21469545230e73e49e4f8dde Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Fix that raw string literals that close on same line were not terminatedEike Ziller2017-05-191-1/+3
| | | | | | | | | | | | | | | | With the built-in model, which affects basic highlighting. Task-number: QTCREATORBUG-17720 Change-Id: I7369d7288d9c2c8e5ef36fc27549121014527e58 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* | CppEditor: Do not highlight C++ and Qt keywords for CNikolai Kosjar2017-05-161-0/+10
| | | | | | | | | | | | | | Task-number: QTCREATORBUG-2818 Task-number: QTCREATORBUG-18004 Change-Id: Ibca60a1711c827dd8b4c0486bff3d49b19a61d8b Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* | C++: Fix broken lexing for floating-pointsLeandro T. C. Melo2017-04-261-2/+4
| | | | | | | | | | | | | | | | Now, I can have my Pi (3.14) typed as double. Change-Id: I33ee579e56d3c735f88278f1868d8739ef277ad6 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* | Remove workarounds for unsupported compilersOrgad Shaneh2017-04-263-26/+3
| | | | | | | | | | Change-Id: Ie28ff761b0bae13c6ebdf7dd649cfbba28e0fc2c Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* | C++ Disable bool keywords in C filesAndre Hartmann2017-04-141-3/+3
|/ | | | | | | | | | | The keywords bool, true, and false don't exist in C90. When using C99 and stdbool.h, they are defined as macros. Amends commit 7b2c09a1186f2cf69f276017ba08da89560f55be Change-Id: I2f2391dd11be841d7d7b249db0b4add8523e53a5 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* C++: Avoid printing to stderr and calling exit()Nikolai Kosjar2017-03-092-38/+1
| | | | | | | | We are not a compiler. Change-Id: I57d8283759d2587b890ff9bc1ca0c173cd910683 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* Fix warning in okapi_bm25.hMarco Bubke2017-01-051-3/+3
| | | | | Change-Id: Ie7be70f37695debff636d9094c6b192cb83f4136 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* C++: Remove concurrent access to TemplateNameIdNikolai Kosjar2016-11-041-3/+0
| | | | | | | | | | | | | | | | | | | The modification of the TemplateNameId changed "global state" because the TemplateNameId is potentially accessed by multiple threads doing lookup (access to same document and thus same symbol names). Depending on the thread scheduling and access to ClassOrNamespace::_specializations, the changed TemplateNameId "suddenly" led to inconsistent results of TemplateNameId::Compare and thus broke the std::map assertions. Get rid of the const_cast, the setter and simply construct a temporary TemplateNameId with isSpecializaton = true. Task-number: QTCREATORBUG-14911 Change-Id: Ie381d132cc0d06af351ace4257773637d1ebee4e Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* C++: Disable C++ keywords in C filesFrancois Ferrand2016-08-232-28/+29
| | | | | | | | | | | | In some (legacy) C files, new and delete may be used for regular identifier. There are some limitations: * Header files have no 'implicit' type, and may be parsed as C++ or ObjC depending on the other files in the project. * QMakeProject use a single ProjectPart for C and C++ files, so there will still be the issue. Change-Id: Iec11687b35f7ccf1e7c0d091b143ae90d950e440 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* C++: Store template typename argument declarator typeOrgad Shaneh2016-08-193-0/+7
| | | | | | | | Differentiate class from typename. Used by a follow-up commit for pretty printing, preserving the original declarator. Change-Id: I496505f5062abb69d5552e5422db256d49d164c4 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* C++: Add support of ref-qualifier for functions.Dmitry Ashkadov2016-06-223-0/+24
| | | | | | | | | | Now the ref-qualifier (& or &&) of the function declaration is propagated to GUI. For example, 'Refactor' -> 'Add Definition' preserves the ref-qualifier. Change-Id: I8ac4e1cad4e44985e94230aabbd9858a7e929fee Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* C++: Fix lexing of >> / >>=Philip Lorenz2016-06-221-3/+3
| | | | | | | | The current code always ends up setting the token to T_GREATER_GREATER. Change-Id: If75ff1f5bccffd5918ec2bf491724cd0981220ae Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Merge remote-tracking branch 'origin/4.0'Eike Ziller2016-05-112-3/+3
|\ | | | | | | | | | | | | | | Conflicts: share/qtcreator/debugger/creatortypes.py src/plugins/beautifier/clangformat/clangformat.cpp Change-Id: I1ab281c190767ced8a6ac2c026a121ea229a36cf
| * Botan: Fix compilation with MSVC2013Orgad Shaneh2016-05-112-3/+3
| | | | | | | | | | | | | | noexcept is not supported. Change-Id: Iee6f80a3e99191ccc92637aea42c5043d4f2d212 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
| * Botan: Add missing noexcept specification.Christian Kandeler2016-05-102-3/+3
| | | | | | | | | | Change-Id: I0f40b31e54cfe26703256114c3c0409a28b47160 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | Merge remote-tracking branch 'origin/4.0'Eike Ziller2016-05-031-1/+1
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/debugger/debuggerruncontrol.cpp src/plugins/projectexplorer/projectwizardpage.cpp src/plugins/projectexplorer/xcodebuildparser.h src/plugins/qmldesigner/qmldesignerplugin.cpp src/tools/clangbackend/ipcsource/translationunits.cpp Change-Id: Ibf0857cf8dbf95fc9ac13d5c2112b3f4a2ca7de6
| * Fix building creator with the intel compiler.David Schulz2016-04-261-1/+1
| | | | | | | | | | | | | | | | | | Replacing all occurrences of win32-msvc* with msvc. Task-number: QTCREATORBUG-16118 Change-Id: I46bd54628bffb04c24bca587fd9dd7684e888f1a Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/4.0'Eike Ziller2016-04-221-18/+47
|\| | | | | | | | | | | | | | | Conflicts: qtcreator.pri qtcreator.qbs Change-Id: I0cbc9d335073e3234f472aa43f462eef9a9178aa
| * C++: Fix expensive parsing of declarationsNikolai Kosjar2016-04-201-18/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | ...which can occurr for e.g. files with a high difference of opening and closing curly braces and many structs. Make use of the ASTCache for parseSimpleDeclaration() and parseMemberSpecification(). Those two were the most recurring calls for the code provided in the bug report. Task-number: QTCREATORBUG-16049 Change-Id: I13cc7fba2fb6c3be863690a222c8bbfeacbddc05 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* | Fix compiler warnings on windows.David Schulz2016-04-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | Ignore some warnings inside 3rd party code and fix a lot of conversion warnings. Change-Id: I909f2f31a4639015bf7dd028d2d435ff1d1167bc Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com> Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* | Merge remote-tracking branch 'origin/4.0'Eike Ziller2016-04-201-2/+2
|\| | | | | | | | | | | | | | | Conflicts: src/plugins/projectexplorer/session.cpp src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp Change-Id: I6946139f5e5fa3a9cdbb322fd50be248e2c0133f
| * C++: Fix accessing invalid file id of SymbolNikolai Kosjar2016-04-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | Symbol::_fileId can be null if the Symbol was created with a null translation unit. That is the case for temporary symbols created for lookup purposes (CreateBindings has a _control with no translation unit and thus creates symbols with no fileId). Task-number: QTCREATORBUG-15967 Change-Id: Iee518b39ba3b636fe1658e74179db3aad054d6f2 Reviewed-by: Orgad Shaneh <orgads@gmail.com>