summaryrefslogtreecommitdiff
path: root/tests/unit/unittest/sourcerangetest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* UnitTest: CleanupMarco Bubke2016-09-191-194/+0
| | | | | | | Improve naming and introduce googletest.h. Change-Id: I445c13db4c23d6dd5682ce0db3b83055cc6b8a89 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clang: Rename TranslationUnitCore to TranslationUnitNikolai Kosjar2016-09-071-8/+8
| | | | | Change-Id: I03a59ae5d5073c812ad40c7623cfb1fdb80aad80 Reviewed-by: David Schulz <david.schulz@qt.io>
* Clang: Rename TranslationUnit(s) to Document(s)Nikolai Kosjar2016-09-071-15/+15
| | | | | | | The "TranslationUnit parts" moved already to TranslationUnitCore. Change-Id: I2bea7847e2b3e84fbfacc3d2dc43f180873349ac Reviewed-by: David Schulz <david.schulz@qt.io>
* Clang: Process distinct documents concurrentlyNikolai Kosjar2016-07-281-2/+2
| | | | | | | | | | | | | Speed ups the typical use cases that can profit from this: * Change a header file and switch then to source file * Open documents one after the other (Follow Symbol) * Change documents visible in splits (e.g. by refactoring action) * Restore a session with multiple splits Fixes the test ClangIpcServer.GetCodeCompletionDependingOnArgumets. Change-Id: Ia575bd59780df14146dfc091a4d48794e4a0543d Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Clang: Extract TranslationUnitCore and (re)parse explicitlyNikolai Kosjar2016-07-281-10/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | Extract TranslationUnitCore, which is the API for the high-level operations we need. TranslationUnit does not call any clang_* functions anymore, except the one needed for disposing the CXTranslationUnit - for now, we keep TranslationUnit the owner of TranslationUnitCore. TranslationUnitCore will be passed on to the worker threads. With this, the current "TranslationUnit" looses its meaning. We will rename it to "Document" in a follow-up change. *** TranslationUnit::cxTranslationUnit does not implicitly creates/parses/reparses anymore. We use more verbose update operations now. The test ClangIpcServer.GetCodeCompletionDependingOnArgumets fails now because of this - CodeCompleter::completeHelper() does not recreate the translation unit anymore, thus working on the old data. This will be addressed in a follow-up change. Change-Id: I6213d6f1609cd3c9a54666c84cb8b623b2fefe1c Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Update License according to agreement with Free Qt FoundationTobias Hunger2016-01-191-17/+12
| | | | | | | * Update license information in tests directory Change-Id: I311441dd37d053ca3175e44b284258e232ee93e0 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* Clang: Tests on MSVC2013: Fix file name clashesNikolai Kosjar2015-11-261-1/+1
| | | | | | | | | | | | | | | | The following files conflicted: src\tools\clangbackend\ipcsource\translationunit.cpp src\libs\3rdparty\cplusplus\TranslationUnit.cpp src\libs\3rdparty\cplusplus\Type.cpp src\tools\clangbackend\ipcsource\type.cpp src\libs\3rdparty\cplusplus\Symbol.cpp src\plugins\clangcodemodel\symbol.cpp Change-Id: If7865570cd70e39e25cc8d508f771c8023288f0c Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
* Clang: Extract highlighting informationMarco Bubke2015-11-171-4/+43
| | | | | | | | | Prepare the move of the semantic highlighting to the clang back end. We have it under tests too so it should be quite easy to make changes or corrections. Change-Id: I5706a8a06fde5a9ba2eba3a8ba62782102ac0bd3 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* Clang: Provide the language option to the backendNikolai Kosjar2015-11-061-0/+1
| | | | | | | | | Provide the language option (e.g. "-x c++-header") when registering a translation unit for the editor. Task-number: QTCREATORBUG-14787 Change-Id: Ie06f9fdab302f1b21ba72cdb65b6aabf9f7bc04c Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Clang: Filter out invalid diagnostic rangesNikolai Kosjar2015-11-061-0/+21
| | | | | | | | | | | | | Apparently libclang might return invalid ranges. Now we discard the invalid ranges. Since there is a diagnostic location (in addition to ranges) the editor will still display an indication for the user. Task-number: QTCREATORBUG-15272 Change-Id: I351e136b9925a53fb2273a394e17873c5533798d Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Clang: Reparse only if files are changedMarco Bubke2015-08-311-3/+8
| | | | | | | | | | Includes are now watched by a file watcher. Unsaved file changes are watched too. If they are changed the translation units which depend on them are set to a state which require a reparse. Later the diagnostics of this units are collected and send back to creator. Change-Id: I2fb5c7dd6644687f22399edd8d18edd6215c9505 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* Clang: Add diagnosticsMarco Bubke2015-08-311-0/+106
Diagnostics are now moved to the clang backend process. Fixits are supported too. Change-Id: I20faacf466bbf78dec479220c3d7b336a47bc453 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>