aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/clangsupport
Commit message (Collapse)AuthorAgeFilesLines
* Clang: Improve project part updatingMarco Bubke2019-04-0120-116/+879
| | | | | | | | | | | | 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>
* Clang: Disable warnings in CommandLineBuilderMarco Bubke2019-03-061-0/+3
| | | | | Change-Id: I7597d57a0bb97facefb08c9c1bbe6e909c146080 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Don't filter source with missing includesMarco Bubke2019-03-061-0/+1
| | | | | | | | 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-061-3/+4
| | | | | | | | | 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>
* Clang: Share executeInLoopMarco Bubke2019-03-042-0/+73
| | | | | Change-Id: Id02902e1e7abdb8b3430e7b228547c4372a424ce Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* ClangPchManager: Show extra progress for dependency buildingMarco Bubke2019-02-222-12/+10
| | | | | | Task-number: QTCREATORBUG-21956 Change-Id: Id244c9ef9fc7825489daa143b21fcca78164d8c7 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Fix progress barMarco Bubke2019-02-2220-88/+142
| | | | | | | | Sometimes the messages are not send immediately, so we force it. Task-number: QTCREATORBUG-21957 Change-Id: I9526cb4b4e3dd8b7a02e15f77bffdc51917d47c8 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Observe the cration of extra compilerMarco Bubke2019-02-181-2/+2
| | | | | | | | We link into the extra compiler factory and notify the PchManager for every extra compiler creation. It enables to monitor if all extra compiler finished. Change-Id: If8da386c88909abd2e0e651e4336865c9dc5bf34 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Disable min and max macrosMarco Bubke2019-02-181-1/+4
| | | | | Change-Id: I75f930053ca514dbd32366c628e7e4916ba8550a Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Fix command line builderMarco Bubke2019-02-141-3/+4
| | | | | | | Add "-nostdinc++" only for C++. Change-Id: I21228fca80045b040877328f41ca0edb4f227fcc Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Fix command line builderMarco Bubke2019-02-121-2/+2
| | | | | | | Clang does not support c18, so we use c17 Change-Id: I272461cf70aa3d620900f76437cf4745f2a0e26c Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* ClangRefactoring: Fix progress counterMarco Bubke2019-02-121-9/+23
| | | | | | | | We use threads now and the code had to be adapted. Task-number: QTCREATORBUG-21950 Change-Id: Ie96c5bea1fa045588d0c5a8b18bfd1ccb5d9fdd9 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Extend ClangTool and CommandLineBuilderIvan Donchevskii2019-02-111-8/+12
| | | | | | | | 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-073-12/+22
| | | | | | | | 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>
* Clang: Fix some issues with running indexer over Qt CreatorIvan Donchevskii2019-02-072-2/+3
| | | | | | | | | | - 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-052-4/+31
| | | | | | | | | | | 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>
* ClangSupport: Fix CommandLineBuilderMarco Bubke2019-01-241-0/+15
| | | | | | | Forgot to add macros. Change-Id: I4a5ab969a6b99c110b3ffd9e8f2b59560ccfc8b9 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* ClangSupport: Remove not used interfaceMarco Bubke2019-01-242-43/+1
| | | | | Change-Id: I0e7ea2ba6dfdf651bbb509a07e866be614e01554 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* ClangRefactoring: Adapt project part in the databaseMarco Bubke2019-01-241-1/+4
| | | | | | | | Extend ProjectPartArtefact and use CommandLineBuilder everywhere. Task-number: QTCREATORBUG-21842 Change-Id: Ibc78849bc543512eccec8a558a1c3f57fec33fa2 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* PchManager: Update only after generated files have been updatedMarco Bubke2019-01-234-0/+12
| | | | | | Task-number: QTCREATORBUG-21843 Change-Id: I881e86dac4074438880d657a07f2e473489ab42d Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* PchManager: Split pch tasks in project and system pch tasksMarco Bubke2019-01-2113-150/+572
| | | | | | | | | | | | | | | | | | | Like you can see in the task numbers this patch is touching many different areas. So I will only touch the main parts. It is using a clang action instead of an extra process which will be enabling the handling of generated files in PCHs. The flags from the project part are now not anymore transformed in a command line but they are saved in the container semantically aware so that they can later be merged. Most of this patch is simply polishing of other patches. Task-number: QTCREATORBUG-21346 Task-number: QTCREATORBUG-21380 Task-number: QTCREATORBUG-21382 Task-number: QTCREATORBUG-21383 Task-number: QTCREATORBUG-21693 Task-number: QTCREATORBUG-21778 Change-Id: I9b0c02d8149b554254e819448fbc61eeaa5b7494 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* ClangPchManager: Introduce PchTaskQueueMarco Bubke2018-12-101-3/+4
| | | | | | | | With the PchTaskQueue the pipeline is almost complete. Task-number: QTCREATORBUG-21346 Change-Id: I5f05d525db1679eb37dd1d462076c1ed42958099 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* ClangPchManager: Add UsedMacroFilterMarco Bubke2018-12-031-4/+5
| | | | | | | | | The compiler macros are filtered in system and project macros. Not used ones are removed. The original order of the macros is retained. Task-number: QTCREATORBUG-21548 Change-Id: Ic9265866bde033e6a9600f9e6439b1697ab73422 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Merge remote-tracking branch 'origin/4.8'Eike Ziller2018-11-097-31/+36
|\ | | | | | | | | | | | | Conflicts: tests/unit/unittest/unittest.pro Change-Id: I4f0ab05f96ee60900a3a35fad4c7331238367593
| * Clang: Add BuildDependenciesStorageMarco Bubke2018-11-081-1/+2
| | | | | | | | | | | | Task-number: QTCREATORBUG-21378 Change-Id: Ibcb90239d240653b21f12a7b96a7775e5b0b4319 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
| * Clang: Refactor FilePathIdMarco Bubke2018-11-086-30/+34
| | | | | | | | | | | | | | | | We don't need the directory id any more. It's not used widely any way. Task-number: QTCREATORBUG-21443 Change-Id: Ia95ea4c72fe9530ac56262f61f17faca04d313ba Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* | Merge remote-tracking branch 'origin/4.8'Eike Ziller2018-11-065-2/+54
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/debugger/debuggermainwindow.cpp src/plugins/qbsprojectmanager/qbsbuildstep.cpp src/plugins/winrt/winrtdevicefactory.cpp tests/unit/unittest/gtest-creator-printing.cpp tests/unit/unittest/gtest-creator-printing.h tests/unit/unittest/unittest.pro Change-Id: Ie9b80b87a8a4fa81baf72a2daa7919b21371c15e
| * Clang: Fix unresolved #includes for ui_*.h headersNikolai Kosjar2018-10-312-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...with an extra parse. Previously, the creation of an e.g. "Qt Widgets Application" from the wizard could show code model errors in mainwindow.cpp. Depending on timing issues, the first error is either 1. 'ui_mainwindow.h' file not found (QTCREATORBUG-15187) The parse happened before the in-memory ui_mainwindow.h was generated by uic. The file system watcher can't help here as the #include was not resolved successfully. And libclang's reparse does not handle this case (it would need to remember all failed #include stats...). ==> Detect this case with the help of the include paths and trigger a full parse. 2. or: allocation of incomplete type... (QTCREATORBUG-15187) The parse happened after the generation of the in-memory ui_mainwindow.h, but before the clangbackend received the unsaved file. ==> Fix this by also writing the content of the unsaved file to our behind-the-scenes-created ui_mainwindow.h. Fixes: QTCREATORBUG-15187 Fixes: QTCREATORBUG-17002 Change-Id: I4f3a81adaa3d604746977a402c29f83fbc5b0e44 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
| * ClangPchManager: Add PchTaskGeneratorMarco Bubke2018-10-252-0/+44
| | | | | | | | | | | | Task-number: QTCREATORBUG-21358 Change-Id: Ia460ce82c3c896f4d0ac00638d03800a55dd27dc Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
| * Clang: Adapt priorities for the same method/constructor overloadsIvan Donchevskii2018-10-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | CXXMethod and CXXConstructor may have different priorities depending ony their origin and attributes. To keep them together in the sorted list we adapt their priorities to have the same value if their names match. To continue keeping ClassCompletion before ConstructorCompletion change the order of the completion kinds for the sort purposes. Change-Id: I36efe5d5dbaa77d604a54b1dafe07d67f44db4c9 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* | Merge remote-tracking branch 'origin/4.8'Eike Ziller2018-10-161-1/+1
|\| | | | | | | Change-Id: I0ff6f659b7ccd4ff5a79e422a1d54488508fe05f
| * Remove hard-coded disabling of debug logsOrgad Shaneh2018-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | Instead, set the default level of all logs to QtWarningMsg. The call to setFilterRules overrides the user preferences in qtlogging.ini. Change-Id: Id5f6cd550d14ff7f45ae04c5d3110e0bafb0f072 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: hjk <hjk@qt.io>
* | Merge remote-tracking branch 'origin/4.8' into masterOrgad Shaneh2018-10-121-8/+1
|\| | | | | | | Change-Id: I6ecd3732a147960681c6135e8752cbd046bad65b
| * Revert "Clang: Merge channels from clangbackend on Windows"Ivan Donchevskii2018-10-111-8/+1
| | | | | | | | | | | | | | | | | | | | This reverts commit 179d8dce7341effd3791e80a90f6fe7b37471671. It causes random crashes caused by different QProcesses so revert until we find a solution for that. Change-Id: Id42f996f54aa5926191f02f9b881ba72eb94689e Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* | Merge remote-tracking branch 'origin/4.8'Eike Ziller2018-10-111-1/+8
|\| | | | | | | Change-Id: I8acb6582890fb2e103996cc4987f7543d22d7108
| * Clang: Merge channels from clangbackend on WindowsIvan Donchevskii2018-10-101-1/+8
| | | | | | | | | | | | | | | | | | DebugView app can't view error channel therefore logging output from clangbackend is not visible. Merging both channels solves the issue. Change-Id: Iadfd97e3ec8c48afddd880647d9c3fe1c707e241 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* | Clang: Add progress bars for creating PCHs and indexingMarco Bubke2018-10-0813-5/+206
| | | | | | | | | | | | Task-number: QTCREATORBUG-21112 Change-Id: Ie0c00a58f479a2fe7cbc7322490808509733ff0f Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* | Merge remote-tracking branch 'origin/4.8'Orgad Shaneh2018-09-2818-432/+9
|\| | | | | | | Change-Id: I8044614199102217b6bfa5e47dac108ce7641185
| * Clang: Remove project tracking on clangbackend sideNikolai Kosjar2018-09-2618-432/+9
| | | | | | | | | | | | | | | | | | | | | | | | ...as it is not needed. Just provide the compilation arguments as part of the Document. As a side effect, re-initializing the backend after a crash is cheaper and will not freeze the UI anymore (referenced bug). Task-number: QTCREATORBUG-21097 Change-Id: I866e25ef1fd5e4d318df16612a7564469e6baa11 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* | ClangRefactoring: Initialize sqlite database only onceMarco Bubke2018-09-261-14/+18
|/ | | | | | | | | | Initializing the database is not cheap so it is better to initializing it only once. We simply check if the database file already exists and then skip the initializing step. Task-number: QTCREATORBUG-21174 Change-Id: I151090c5081c009f7913a30517065be2833791d8 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Merge remote-tracking branch 'origin/4.7' into 4.8Eike Ziller2018-09-261-2/+2
|\ | | | | | | Change-Id: Iaae859601ae4f529c1fa7ada3a5c569820abb0d6
| * Fix incorrect grammar in 'does not exists'Kai Koehne2018-09-211-2/+2
| | | | | | | | | | | | Change-Id: I790d9bbdfc170808ff66e70be0f81d1c292c0bcb Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* | Highlighting: Add highlighting style for punctuationIvan Donchevskii2018-09-133-1/+3
| | | | | | | | | | | | | | | | | | Currently only operators have their own style but not punctuation tokens. Make possible to highlight both. Task-number: QTCREATORBUG-20666 Change-Id: I9533e0f1bef65b86c4e4f5c9756571103584124b Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* | Clang: Add generated files support for pch managerMarco Bubke2018-09-124-4/+50
| | | | | | | | | | Change-Id: I69aae62dd1091a1958d4b0f23a37758c9f58c97b Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* | Clang: Improve generated files handlingMarco Bubke2018-09-061-1/+1
| | | | | | | | | | | | | | | | Generated files are referenced by the system collector directly to set the unsaved files. Change-Id: I24be3ee544b7824b8b0e518eafd409f32bd002ab Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* | Clang: Use only filePathId for comparisonMarco Bubke2018-08-231-6/+2
| | | | | | | | | | | | | | | | | | The filePathId is already unique and the directoryId is there only to improve the access time for the directory. So it is already strongly ordered if we compare only filePathId. Change-Id: I67255bea1d36d41a59421eeb51964440c053b1e3 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* | Clang: Compile fix for older clangChristian Stenger2018-08-162-11/+17
| | | | | | | | | | | | | | | | | | | | This patch is needed due to some issues of an older STL implementation. The patch can safely be reverted when Xcode 8 is marked as outdated. Change-Id: I0f66eb6f3a0ae71f0da3f5678d9b4d47cdf146bf Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* | ClangRefactoring: Integrate generated filesMarco Bubke2018-08-144-7/+25
| | | | | | | | | | | | | | | | | | | | | | This is an intermediate step to handle the indexing of the project parts completely. The generated files are now independently handled from the project parts. We still not handle the case the a file is indexed but the generated file is not provided. This will be done in a different patch. All provided data is now sorted too to improve merging. Change-Id: I09712b99217a881ec0a233d09aea8659fb787324 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* | Clang: Fix MSVC buildIvan Donchevskii2018-08-091-0/+8
| | | | | | | | | | | | | | For some reason it asks for more operator() versions. Change-Id: Iff39e5e74737632d7a4ffd8553ff757e3954e010 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* | Clang: Add GeneratedFilesMarco Bubke2018-08-084-3/+129
| | | | | | | | | | | | | | | | To manage generated files it is very useful to have a class which adds, updates and remove them. Change-Id: Ifc842400e17d1a51adf723c32996a080f0348f57 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>