Review Request 119999: Do not update caches of system headers when the environment changed.
Kevin Funk
kfunk at kde.org
Tue Sep 2 08:14:39 UTC 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119999/#review65677
-----------------------------------------------------------
Looks good to me, too. Makes a lot of sense to do it like this.
Some minor nitpicks.
clangparsejob.cpp
<https://git.reviewboard.kde.org/r/119999/#comment45896>
'const&' -> 'const'
duchain/clanghelpers.cpp
<https://git.reviewboard.kde.org/r/119999/#comment45895>
'const bool' -> 'bool'
- Kevin Funk
On Aug. 31, 2014, 9:25 p.m., Milian Wolff wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/119999/
> -----------------------------------------------------------
>
> (Updated Aug. 31, 2014, 9:25 p.m.)
>
>
> Review request for KDevelop, Kevin Funk, Olivier Jean de Gaalon, and Sergey Kalinichev.
>
>
> Repository: kdev-clang
>
>
> Description
> -------
>
> This greatly improves the performance when we edit two files with
> different environments which each include some system includes.
> Without this patch, we'd play cache ping-pong on the system includes.
>
> NOTE: This is not yet optimal as we can still play cache ping-pong
> for user headers as soon as the include paths or defines for a given
> set of includers are different. But maybe this is a first step
> and a good idea in general? Feedback welcome!
>
> Mark include paths outside of opened projects as system includes.
>
> This hopefully improves the effectiveness of our checks for
> clang_Location_isInSystemHeader. I couldn't test it yet and have
> to go to bed now :)
>
>
> Diffs
> -----
>
> clangparsejob.cpp 6a9eccda37caf926a19c452a9c30e2143c83d659
> duchain/clanghelpers.cpp 099b8ea8338afb0dd6a11a336710fe7ffbf00068
> duchain/clangparsingenvironment.h f70d093a5d3716256ba8dfad965bc9fbf5f877fb
> duchain/clangparsingenvironment.cpp b90f019871d6f843ad3fd79da97ea83c62067282
> duchain/clangparsingenvironmentfile.h 72b7aeb962a9a8513df574d534b6ac54855bf1f6
> duchain/clangparsingenvironmentfile.cpp ab0bf6712ce17a49f4e64caef29e55d98572d000
> duchain/parsesession.cpp 041e58680f71ed2eff99ff7fd5afb866819d58ec
> tests/test_duchain.h 3932aad1cb543e640fd6c34e7cfc5ed68f8e0d7f
> tests/test_duchain.cpp 66ac9f64883f02f68795bbef36a322f3de17d35f
>
> Diff: https://git.reviewboard.kde.org/r/119999/diff/
>
>
> Testing
> -------
>
> tried the unit test and also manually tested the following:
>
> ~~~~~~~ CMakeLists.txt: ~~~~~~~~~~
> cmake_minimum_required(VERSION 2.8.11)
> project(test)
>
> add_executable(fileA fileA.cpp)
> set_property(TARGET fileA APPEND PROPERTY INCLUDE_DIRECTORIES "/tmp/foo")
>
> add_executable(fileB fileB.cpp)
> set_property(TARGET fileB APPEND PROPERTY INCLUDE_DIRECTORIES "/tmp/bar")
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> And both fileA.cpp and fileB.cpp just need to have something like this:
>
> ~~~~~~~~~~~~~~~~~~
> #include <iostream>
> int foo() {}
> ~~~~~~~~~~~~~~~~~~
>
> Now run this in a kdev-clang KDevelop session and enable the corresponding
> debug area. Once both files are cached/highlighted, change one of them, wait
> for the update, then the other. With change I mean e.g. add an argument to the
> function or anything like that, but keep the iostream include.
>
>
> Thanks,
>
> Milian Wolff
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20140902/4ad93898/attachment-0001.html>
More information about the KDevelop-devel
mailing list