summaryrefslogtreecommitdiff
path: root/src/tools/clangpchmanagerbackend/source
Commit message (Collapse)AuthorAgeFilesLines
* ClangPchManager: Improve handling of no include in project PCHMarco Bubke2019-06-172-9/+6
| | | | | | | | We were doing simply nothing but we should call PchCreator::doInMainThreadAfterFinished(). Change-Id: Ia21d2cf4af53121d9e401f6e9a5b432a4daed00f Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clang: Improve updatingMarco Bubke2019-06-175-23/+44
| | | | | | | | If project parts are up to date we send them directly to the indexer, so the indexer can decide we something needs an update. Change-Id: I7d4f32794c6b3a861cdefb3653a6dfd4e711f619 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* ClangPchManager: Improve settings for PCH creationMarco Bubke2019-06-051-0/+2
| | | | | | Change-Id: I398721f5b2659a958252812057e6b2510a351ab6 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Clang: Remove DelayedTemplateParsing settingsMarco Bubke2019-06-051-1/+0
| | | | | | | | It will be use the default which should be provide less errors. Change-Id: I2f5feefe574cbda6cd85f10620dfb75c46a0f7b7 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake build: Add unittest CMake build filesCristian Adam2019-05-291-0/+49
| | | | | | | | | On MinGW 8.1 I get the following after running ctest -j 40 99% tests passed, 35 tests failed out of 2631 Change-Id: I2c3ce7940b036e52ef393feab5837886355e7b5a Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Clang: Sprinkle some overrides over the codebaseTobias Hunger2019-05-131-2/+2
| | | | | | | This silences several warnings. Change-Id: I0a15ee833ea4c3de4e6adafb72e530a2c4577b09 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Clang: Fix system pre include search pathMarco Bubke2019-04-297-62/+32
| | | | | | | | We now get the resource path from creator. The -fPIC case is working now too. Change-Id: Id191e89e6d46706748d50440038a06a349972cc9 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* ClangPchManager: Don't generate PCHs if there is no includeMarco Bubke2019-04-292-28/+37
| | | | | Change-Id: I88caab6ff188b64d92a74d61276c4724c33cae23 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Reindex without PCHs if error are occurringMarco Bubke2019-04-232-3/+28
| | | | | | | | | If an occurs we first reindex with the system PCH only and if it is still occurring we are indexing without any PCH. Task-number: QTCREATORBUG-22011 Change-Id: I815ee3abe7829aaeb191d985cd045bac35015893 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* ClangRefactoring: Move transaction in fetchPrecompiledHeaderMarco Bubke2019-04-231-3/+11
| | | | | | | | Prepare the move of fetchPrecompiledHeader in the lambda to execute it in the thread. Change-Id: I00f906196dabfdb5cd38f4b9752d92678236b849 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Refactor fetchPrecompiledHeaderMarco Bubke2019-04-232-5/+10
| | | | | | | We don't need the other information any more. Change-Id: Ie34a646df34e336591c124093a15e90307ac88ec Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* ClangPchManager: Fix alive messageMarco Bubke2019-04-232-2/+10
| | | | | | | | Computing the dependencies can take quite some time. So it is better to ensure that the alive timer is fired. Change-Id: I0b372ef73a8a5e6716673ba9457d424151a762bb Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Fix set_union bugMarco Bubke2019-04-043-16/+22
| | | | | | | | | | | std::set_union in libC++ is broken for move iterators. We has to use temporarily our own implementation which can be removed if we move to a newer version of XCode. Task-number: QTCREATORBUG-22246 Change-Id: I8fccc8aab5f8af738aa2e589ba65924363cd818d Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Minimize reindexingMarco Bubke2019-04-027-421/+8
| | | | | | | | | | We optimal indexer is only reindexing if the index would be changed. This patch is a step in that direction. We only reindex now if the file or project has changed. It fixes some typos too. Task-number: QTCREATORBUG-21150 Change-Id: I6ea1c13282fbcd70253b9b2939aed37580dbd160 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* ClangPchManager: Handle non generated PCHsMarco Bubke2019-04-024-3/+25
| | | | | | | | | | | | Sometimes we start generation of PCHs but not finish it. In that case we should redo it at the next start of the backend process. So we now remove the old precompiled header if we add the task to the queue. If we successfully generated the PCH it will be set again. But if we did not it will be read from the database and set to false. Task-number: QTCREATORBUG-22035 Change-Id: Id53c2b4e4f501fc5ef7830558085607baa6a49f1 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Fix build with LibToolingIvan Donchevskii2019-04-021-1/+1
| | | | | Change-Id: Iad8ab423c3d0f05e5c065f00d471bf6b778081f5 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Merge remote-tracking branch 'origin/4.9'Eike Ziller2019-04-0222-177/+244
|\ | | | | | | | | | | | | | | | | Conflicts: qbs/modules/qtc/qtc.qbs qtcreator.pri src/plugins/pythoneditor/pythoneditorplugin.cpp Change-Id: I9a95df5e16b34538539ced7dfc5d326b700794e6
| * Clang: Improve project part updatingMarco Bubke2019-04-0122-177/+244
| | | | | | | | | | | | | | | | | | | | | | | | The project part ids are now already created very early in the database. This removes some checks because we can assume that an id already exists. The project part are now completely persistent, so we can read them from the database and compare them with new generated from a new creator session. This should help to not recreate the same PCH again and again. Task-number: QTCREATORBUG-21151 Change-Id: Iced818ff9f7431eaed3e37978087cc0a43b9afda Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* | Merge remote-tracking branch 'origin/4.9'Eike Ziller2019-03-1424-302/+435
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | Conflicts: qbs/modules/qtc/qtc.qbs qtcreator.pri src/plugins/debugger/debuggerkitinformation.cpp src/plugins/languageclient/languageclientmanager.cpp src/plugins/plugins.pro src/plugins/projectexplorer/kit.cpp src/plugins/projectexplorer/kitmanager.cpp Change-Id: I66fb941202991f35f7d7761430b21e42dfc678a8
| * Clang: Rename ProjectParts in ProjectPartsManagerMarco Bubke2019-03-066-35/+34
| | | | | | | | | | Change-Id: Ia60d78e34a296b0b379339ebc14efd0e81dc8989 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
| * Clang: Don't filter source with missing includesMarco Bubke2019-03-064-83/+92
| | | | | | | | | | | | | | | | We do now tag and save them. So we can reliably track them. Task-number: QTCREATORBUG-22035 Change-Id: I49aaeeb76150b7e2d77b863eeb0aedefc9ab50f4 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
| * Clang: Improve dependency buildingMarco Bubke2019-03-0619-206/+331
| | | | | | | | | | | | | | | | | | We want to use the cached values in the database because it is faster than to parse the the files again. Task-number: QTCREATORBUG-22035 Change-Id: I7ada7073887b1d89a06332fdb617701cb69ccd68 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* | Merge remote-tracking branch 'origin/4.9'Eike Ziller2019-03-053-8/+14
|\ \ | |/ | | | | | | | | | | | | | | Conflicts: qbs/modules/qtc/qtc.qbs qtcreator.pri src/tools/clangpchmanagerbackend/source/taskscheduler.h Change-Id: I518adaf647df412887c2a372416634359f09ad2a
| * Clang: Use system PCH if projectpart PCH does not existsMarco Bubke2019-03-041-3/+4
| | | | | | | | | | | | | | | | Then entry can be empty or null, so we test for both. Task-number: QTCREATORBUG-21978 Change-Id: Ic824d897b3c38051a2304c9487ea5f2f7c9eeef8 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
| * Clang: Move fetchPrecompiledHeader to PrecompiledHeaderStorageMarco Bubke2019-03-042-0/+12
| | | | | | | | | | | | | | It went for historical reasons in the symbol storage. Change-Id: If05edb868901884f3951d0eb2f152566e99b4d1a Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
| * Clang: Share executeInLoopMarco Bubke2019-03-041-41/+1
| | | | | | | | | | Change-Id: Id02902e1e7abdb8b3430e7b228547c4372a424ce Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* | Merge remote-tracking branch 'origin/4.9'Orgad Shaneh2019-03-015-10/+50
|\ \ | |/ | | | | Change-Id: I801042a53ae4d02d1891ea582ca9ea89b00d3181
| * ClangPchManager: Show extra progress for dependency buildingMarco Bubke2019-02-222-2/+8
| | | | | | | | | | | | Task-number: QTCREATORBUG-21956 Change-Id: Id244c9ef9fc7825489daa143b21fcca78164d8c7 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
| * Clang: Fix unit test build without QTC_ENABLE_CLANG_LIBTOOLINGNikolai Kosjar2019-02-203-8/+42
| | | | | | | | | | Change-Id: Ifa6588d1427489e8ae98ea8093d5d94049c270ee Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* | Fix GCC 6.2.1 build errorAntonio Di Monaco2019-02-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | The build error is: src/tools/clangpchmanagerbackend/source/taskscheduler.h:93:17: error: cannot call member function ‘void ClangBackEnd::TaskScheduler<ProcessorManager, Task>::... without object executeInLoop([&] { m_queue.processEntries(); }); Change-Id: Ib1c9ad2b9db39be75f4af77cf95baf05fbc13415 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* | Merge remote-tracking branch 'origin/4.9'Eike Ziller2019-02-201-15/+27
|\ \ | |/ | | | | Change-Id: I0d3db14e583628b906d7fdeb800e004d98e52632
| * ClangPchManager: Optimize UsedMacroFilterMarco Bubke2019-02-191-15/+27
| | | | | | | | | | | | | | We need only run one time over all elements. Change-Id: I98061014380874549b1976fe6d6a32af43fedfea Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* | Merge remote-tracking branch 'origin/4.9'Eike Ziller2019-02-197-11/+43
|\ \ | |/ | | | | Change-Id: I7bdb6a4658c5fca1a7e1dda5adbb5613dabc6d18
| * ClangPchManager: Allow errors in pch-sIvan Donchevskii2019-02-181-0/+4
| | | | | | | | | | | | | | | | | | There are cases when we can't avoid errors when we put all system includes together. This might lead to not having any pch-s which makes the indexing useless (too slow). Change-Id: Icdbfdf916bbd0ed9b6cd18f9c976d3d4efb0e18f Reviewed-by: Marco Bubke <marco.bubke@qt.io>
| * Clang: Disable min and max macrosMarco Bubke2019-02-181-2/+0
| | | | | | | | | | Change-Id: I75f930053ca514dbd32366c628e7e4916ba8550a Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
| * ClangPchManager: Don't watch generated filesMarco Bubke2019-02-182-1/+19
| | | | | | | | | | | | Task-number: QTCREATORBUG-21983 Change-Id: I80af39278140c48c8740c83af85596d3ee9bf2da Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
| * ClangPchManager: Fix PchTaskMergerMarco Bubke2019-02-182-5/+9
| | | | | | | | | | | | | | | | We forgot to remove the duplicates for used macros. Task-number: QTCREATORBUG-21955 Change-Id: I051b8199ba5dd0a173d80c9e526bf745d3bcd777 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
| * ClangPchManager: Add dependency building to progress counterMarco Bubke2019-02-182-3/+11
| | | | | | | | | | | | Task-number: QTCREATORBUG-21950 Change-Id: I409b03d53b374c5bf66ba6c7c9e50e98a7b239c4 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* | Bump minimum Qt version (to build Qt Creator) to 5.11Alessandro Portale2019-02-151-33/+0
|/ | | | | | | | | Recent adaptations to Qt 5.13's API deprecations require using APIs which were introduces in Qt 5.11. Change-Id: I6c077d824c9ce716e019543b290c355a5d512fad Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ClangRefactoring: Fix PCH buildMarco Bubke2019-02-123-11/+47
| | | | | | | | | | We have to generate a PCH which is not checked by size or data. For that we have to remap the file so it get the overridden flag. If that flat is set no checks will be performed. Task-number: QTCREATORBUG-21958 Change-Id: Id9bff91b3ab64526dc109eb46d4a21766456abe5 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Improve performance by reducing parsingMarco Bubke2019-02-114-42/+90
| | | | | | | | | | | | We generate one big file per project part so the preprocessor is skipping the recurring includes. This generated many errors about missing macros but we don't care much about them during dependency collection step so we just silence these errors with ignoring diagnostics consumer. Change-Id: I5581d623b5d5f9995496252735577ea6b54790d9 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Extend ClangTool and CommandLineBuilderIvan Donchevskii2019-02-113-7/+4
| | | | | | | | We now support source file and not only header files and the file path is now automatically added to the end. This removes quite some clutter. Change-Id: I74eabd262e6c7e5f4d523e3a3cd194bd3efe1ef3 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Use full paths in compilation database for symbol collectorIvan Donchevskii2019-02-072-9/+10
| | | | | | | | We we FilePath and NativeFilePath so that compiler warns us if we mix them up. Change-Id: I33d7abc7e4e724dff2a9b2b9b23deea8b358ccfd Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* ClangPchManager: Don't generate a PCH header file any moreMarco Bubke2019-02-072-32/+4
| | | | | | | | | We used an extra process to generate the PCH but now we use clang tooling so we can utilize the in memory file system. Task-number: QTCREATORBUG-21933 Change-Id: I1c1d39248e9513c87269d854c35d38b373b0f515 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Fix some issues with running indexer over Qt CreatorIvan Donchevskii2019-02-071-0/+1
| | | | | | | | | | - fix qDebug channels on Windows - fix the number of perameters in the sql statement - fix nullptr access - speed up preprocessor a little bit Change-Id: Ic9b32fbcc6b409c4064c4f522b94391cbff8654e Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* ClangPchManager: Merge system pch tasksMarco Bubke2019-02-055-53/+195
| | | | | | | | | | | The merging of the include search paths is quite heuristic but we could provide an option to disable pch merging so users can decide themselves. Maybe we could give user feedback why we cannot merge but this is quite advanced. Task-number: QTCREATORBUG-21381 Change-Id: Iac6af0c587b631d2151f63d6d97215ed6919819f Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* ClangPchManager: Fix deferred project partsMarco Bubke2019-02-051-0/+2
| | | | | Change-Id: Ie760c0dd269c643a147d7edf3f1b812cd27fe4c4 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Fix crash on exitMarco Bubke2019-02-051-0/+5
| | | | | | | | | | There were threads running but the instances they called were already deleted. Now we delete the scheduler first which is the thread holder and which is waiting that all threads are finished. Task-number: QTCREATORBUG-21882 Change-Id: I2e9f4d8381d79fab9a93346cef6598ab8e8f7850 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* ClangPchManager: Update ClangPathWatcher after PCH creationMarco Bubke2019-01-285-4/+20
| | | | | | | | | If the PCH creation was successful we want to watch the PCH to update the PCH. Task-number: QTCREATORBUG-21800 Change-Id: Ic84901bde23f60ce2f4e2781ddd1e4f895354ab1 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* PchManager: Fix generated file handling in PchCreatorMarco Bubke2019-01-242-2/+7
| | | | | | Task-number: QTCREATORBUG-21843 Change-Id: I0517b87725117b7db7db14d32b737a0a6f2b3c35 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>