Commit Graph

9 Commits

Author SHA1 Message Date
Ivan Donchevskii
7d64c9e3ec Clang: Fix some issues with running indexer over Qt Creator
- 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>
2019-02-07 07:45:24 +00:00
Marco Bubke
64a3a130ac Clang: Add BuildDependencyCollector
IncludeCollector is renamed to BuildDependencyCollector. It is now
returning a BuildDependency instead of individual getter. The test coverage
is improved too.

Task-number: QTCREATORBUG-21379
Change-Id: Ifc2d1c40c85772cf498c21968de526f4408b6023
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-11-20 14:24:03 +00:00
Marco Bubke
ee2122be70 ClangPchManager: Add build dependencies to include collector
It's a first step but we have to refactor the interface later.

Task-number: QTCREATORBUG-21379
Change-Id: Idda666bcaec950203f001c993c54a926779527e0
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-10-25 13:35:02 +00:00
Marco Bubke
6fba0be280 ClangRefactoring: Improve symbol parsing
Declarations are only indexed if their file has been changed and references
has to be indexed if the file or any included file has been changed.

Change-Id: I07c6de1379bce2462c1e0fad34d4378a3da4397b
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-08-27 08:51:29 +00:00
Marco Bubke
39e78bd3f6 Clang: Don't index already indexed symbols
We don't index system headers any more and introduce a first step to
decrease double indexing. For that we introduces the SourcesManager which
so far tells you only if a file was already indexed for a certain time
stamp.

Change-Id: Icde54465693ca84a622764c595635cac365c0111
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-08-20 13:16:52 +00:00
Marco Bubke
a8b11cb2c5 Clang: Improve access to caching structure
The clang file id is counted from zero, so it better to use a vector
instead of a hash with all the overhead.

Change-Id: Iaf201898e9e16005d196b5b49065f15f9d3d2dfa
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-03-27 14:45:41 +00:00
Marco Bubke
576eb3370c Clang: Use the clang indexer for indexing
It is not removing so much code but will makes somethings easier in the
future. We added the SymbolType::Definition too.

Change-Id: I4e106b8518e6bfed0c6a4aa6be61c4a5fe5f8bef
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-03-27 14:45:35 +00:00
Marco Bubke
048224bef1 Clang: Collect source dependencies
It is quite easy because we track the include directives in the
preprocessor callbacks.

Change-Id: I2d7bd67b31f50c0d8d4a46c57e83dffa0c558dc7
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-02-01 15:06:09 +00:00
Marco Bubke
0f8befacd3 Clang: On the road to update and preprocessor support
This patch has grown in a quite big change set and it is really hard to
divide it in different parts.
V2::ProjectPartContainer is now using FileIds instead of file paths. This
cleans code up because it is a big step in the direction that internally
only file ids are used. But it is depending on the file cache, so the
file cache has to be provided as an argument. There is now an interface for
transactions too which are ease the testing of them and enables the support
of preprocessor. It adds macros as symbols and is saving used macros. The
used macro support is enabling update improvements because only if a
changed macro is used it needs to be recompiled. This is still in flux
and can be changed in later patches.

Change-Id: I492a2c9af1201d40fdd9f46a0045f7878bbbaa3d
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-29 13:47:09 +00:00