Commit Graph

8 Commits

Author SHA1 Message Date
Nikolai Kosjar
36e7f4541f Clang: Pass on file paths with native separators
libclang 3.8 seems to be sensitive to file paths separators [1]. On Windows,
this led to not updated document annotations and/or crashes after reparsing.

When passing file paths to libclang, convert to native separators.
When getting file paths from libclang, convert back.

This handles:
 * main file path
 * file paths of the unsaved files
 * -I<DIR> arguments, the resource path (for builtins) and the paths to the
   wrapped qt headers
 * included header files from libclang
 * source locations from libclang

Also, minimize the conversion in SourceLocation to a minimum by making
filePath() lazy.

[1] https://llvm.org/bugs/show_bug.cgi?id=28381

Change-Id: If5866f34a6fdc6b34b16c022d3988e8e6eae2a0a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-07-04 13:08:03 +00:00
Tobias Hunger
954569387c Update License according to agreement with Free Qt Foundation
* Update license information in tests directory

Change-Id: I311441dd37d053ca3175e44b284258e232ee93e0
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 16:01:06 +00:00
Nikolai Kosjar
216f110385 Clang: Tests on MSVC2013: Fix file name clashes
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>
2015-11-26 13:54:21 +00:00
Nikolai Kosjar
23fa5a7efd Clang: Provide the language option to the backend
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>
2015-11-06 11:54:16 +00:00
Marco Bubke
f2b7371af1 Clang: Reparse only if files are changed
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>
2015-08-31 15:00:07 +00:00
Nikolai Kosjar
9e4a4586f9 Clang: Tests: Fix unit tests compilation on Windows
Change-Id: Id9e51de3b2bcb273fd2268ba7f7192f80dee1f53
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-07-02 13:16:16 +00:00
Marco Bubke
2b84d7611b Clang: Reorder includes
Change-Id: I324e88c0d295114390c1fac2745c0d2d47637ece
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-16 13:53:30 +00:00
Marco Bubke
1402c067b1 Clang: Rename CodeModelBackEnd in ClangBackEnd
Change-Id: I13e8a458634110456375956d4d4da7239c86957f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-16 13:29:27 +00:00