Commit Graph

15 Commits

Author SHA1 Message Date
Marco Bubke
4280a68d9f ClangPchManager: Watch unchanged PCHs
Change-Id: I7f4c0f12e4fbf3714e5bfe7655cfa13cac85f71f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:50:52 +00:00
hjk
835ff7e692 Use pointer to member or member function with transform
... when possible.  More compact.

Change-Id: I81410b7e6d523b9405c87f70a474ded1fa9ce960
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-08-14 11:53:32 +00:00
Marco Bubke
cc87615fcd Clang: Differentiate between user and non user includes for updating
We don't want to recreate a PCH if the include or source is not
contained by a PCH.

Change-Id: If52fc1aed92054b4165cdc634656147fbe8baa47
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-07-04 08:40:45 +00:00
Christian Kandeler
4fc3ee8e5b clangsupport: Fix compiler warning about initialization re-ordering
Change-Id: I330940e05fe29632f7cb0628151fdec11708b826
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-02 14:39:04 +00:00
Marco Bubke
bbd58ca30b Clang: Watch directories instead of files
Because there a limited resources to watch files we watch now directories.
So we need much less resources.

Change-Id: Iac558832e9521a7a1a67c5ea99b42ad1b0b5129c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-06-27 12:31:52 +00:00
Marco Bubke
6effa1822b Clang: Improve project part updating
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>
2019-04-01 10:31:38 +00:00
Marco Bubke
ff1ce3a475 Clang: Honor directories for the file name
The file name id must be unique for very entry, so the directory id must be
incorporated too. Now there is always one unique integer id for every
file path. The directory id is there to access and compare the directory
much faster but not provide any data to the uniqueness of the id.

Change-Id: I0f9a2ca70bc9dda0ce32ebc45eb7b082821eb909
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-03-28 14:01:12 +00:00
Orgad Shaneh
956e6f3a97 Clang: Fix MSVC build
Link error:
clangpchmanagerbackendmain.obj : error LNK2019: unresolved external symbol
    "__declspec(dllimport) public: __cdecl ClangBackEnd::ClangPathWatcher<class QFileSystemWatcher,class QTimer>::ClangPathWatcher<class QFileSystemWatcher,class QTimer>(
        class ClangBackEnd::FilePathCachingInterface &,class ClangBackEnd::ClangPathWatcherNotifier *)"
    (__imp_??0?$ClangPathWatcher@VQFileSystemWatcher@@VQTimer@@@ClangBackEnd@@QEAA@AEAVFilePathCachingInterface@1@PEAVClangPathWatcherNotifier@1@@Z) referenced in function main

Looks like MSVC looks for import even for inline template functions.

Another alternative is to revert 351f355b69
and either ignore or suppress the GCC warning.

Change-Id: I040d4e3924af7f4d1f4424276329c6095e6ff6bd
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-18 08:07:49 +00:00
Eike Ziller
115afed94b Merge remote-tracking branch 'origin/4.6'
Conflicts:
	tests/unit/unittest/gtest-creator-printing.cpp
	tests/unit/unittest/gtest-creator-printing.h

Change-Id: I43d2571617bfbf41c0fcf23502ab77975540eba4
2018-01-17 09:30:57 +01:00
Orgad Shaneh
351f355b69 ClangSupport: Add 2 missing exports
Fixes the following GCC warnings:

In file included from .../clangpchmanagerbackend/clangpchmanagerbackendmain.cpp:26:0:
.../clangsupport/clangpathwatcher.h: In instantiation of ‘class ClangBackEnd::ClangPathWatcher<QFileSystemWatcher, QTimer>’:
.../clangpchmanagerbackend/clangpchmanagerbackendmain.cpp:114:78:   required from here
.../clangsupport/clangpathwatcher.h:80:7: warning: ‘ClangBackEnd::ClangPathWatcher<QFileSystemWatcher, QTimer>’
    declared with greater visibility than the type of its field ‘ClangBackEnd::ClangPathWatcher<QFileSystemWatcher, QTimer>::m_idCache’ [-Wattributes]
 class ClangPathWatcher : public ClangPathWatcherInterface
       ^~~~~~~~~~~~~~~~

Change-Id: I8c6bc30e80da50b631d272ff7c2120cf706548aa
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-01-17 07:21:17 +00:00
Ivan Donchevskii
924921ee3b Fix build
Fails on macos after 98fa7cbb3f

Change-Id: I554c716219f6461960c526ef3ed5d5d7c29efc37
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-01-12 20:00:36 +00:00
Marco Bubke
6f8f8d0cbf Clang: Extend ClangPathWatcher to communicate path changes
Change-Id: Iad2d6adc53fbc2ee32fd63b9ccdc8999d41a89da
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-10 12:38:16 +00:00
Marco Bubke
98fa7cbb3f Clang: Use FilePathId in ChangedFilePathCompressor
Change-Id: I622d9196ec12c6fe6e07ef9c953586f2f40b9a5c
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-10 12:37:37 +00:00
Marco Bubke
a15250051d Clang: Handle native file in the file cache
Different types are introduced for normalized and native file path. So the
compiler is warning you if you try the wrong format.

Change-Id: I1da0686b142cbf9bb7578468c2b50f90a94cebf9
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-11-23 11:55:15 +00:00
Marco Bubke
b0137c3a01 Clang: Move path watcher to clang support
Change-Id: I3b54304bcbba750ef826e6244b8f6c7000c9cf9b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-11-21 17:38:07 +00:00