Review Request 121757: Use target environment whenever available, and implement TU pinning (WIP)

Milian Wolff mail at milianw.de
Thu Jan 8 18:07:13 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/121757/#review73516
-----------------------------------------------------------



clangparsejob.cpp
<https://git.reviewboard.kde.org/r/121757/#comment51160>

    hasBullshitInfo :P please un-abbreviate



clangparsejob.cpp
<https://git.reviewboard.kde.org/r/121757/#comment51173>

    this should use the tuUrl here, no? and we'd get ast sharing for free then, if I'm not mistaken.



duchain/clangindex.h
<https://git.reviewboard.kde.org/r/121757/#comment51172>

    not really a multi hash you are using. do you want to?



duchain/clangindex.cpp
<https://git.reviewboard.kde.org/r/121757/#comment51171>

    m_urlsInTU.value(tu.value()) to ensure we never detach here



duchain/clangindex.cpp
<https://git.reviewboard.kde.org/r/121757/#comment51170>

    please add a flatImports.reserve(imports.size() + 1);



duchain/parsesession.h
<https://git.reviewboard.kde.org/r/121757/#comment51168>

    URL



duchain/parsesession.h
<https://git.reviewboard.kde.org/r/121757/#comment51167>

    const&



duchain/parsesession.cpp
<https://git.reviewboard.kde.org/r/121757/#comment51166>

    similar to your change belw, the fromUtf8 could be removed here and a .toString() used instead. please do this also with the change below



duchain/parsesession.cpp
<https://git.reviewboard.kde.org/r/121757/#comment51165>

    this should check whether the file passed in here equals the unit file. otherwise we get the TODO's from the .h associated  with the .cpp and vice versa on updates.



duchain/parsesession.cpp
<https://git.reviewboard.kde.org/r/121757/#comment51164>

    yes - please fix it in a separate commit (no need for a review). this explains the bug I noticed recently and I mentioned in IRC. thanks for spotting it!



duchain/parsesession.cpp
<https://git.reviewboard.kde.org/r/121757/#comment51162>

    const&



duchain/tuduchain.cpp
<https://git.reviewboard.kde.org/r/121757/#comment51161>

    unrelated, just push this as-is in a separate commit plaese



tests/test_duchain.cpp
<https://git.reviewboard.kde.org/r/121757/#comment51169>

    if I understood you correctly this is unrelated to the change here. please push in a separate commit without another review round.


- Milian Wolff


On Jan. 7, 2015, 5:16 p.m., Olivier Jean de Gaalon wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/121757/
> -----------------------------------------------------------
> 
> (Updated Jan. 7, 2015, 5:16 p.m.)
> 
> 
> Review request for KDevelop, Kevin Funk and Milian Wolff.
> 
> 
> Repository: kdev-clang
> 
> 
> Description
> -------
> 
> Note: This requires IBuildSystemManager::hasIncludesOrDefines, which should probably be renamed to isTranslationUnit()
> 
> The idea here is to use the AST of the buildsystem's translation units wherever possible, since that's the only file that's guaranteed to have correct defines and includes (and furthermore can handle strange cases such as '#include inside namespace' and picky include/define ordering).
> This proposal essentially allows TU environments to override non-TU environments and then get "pinned" so that the non-TU will continue to use the TU AST to build its duchain.
> This could eventually be exposed in the UI, allowing the user to pick different "views" of headers (overriding the pinned TU).
> The pinning data needs to be fleshed out to handle expiry (header no longer included) and be serialized with an ItemRepository.
> 
> I'm looking for feedback on this idea... where does it break? Any better ideas?
> 
> This more or less works, we can flesh it out more if we want to take this route.
> 
> 
> Diffs
> -----
> 
>   clangparsejob.h 1cc8282 
>   clangparsejob.cpp 297b836 
>   duchain/clanghelpers.h 4216454 
>   duchain/clanghelpers.cpp 5f29a2a 
>   duchain/clangindex.h 991c7ca 
>   duchain/clangindex.cpp 02c93cf 
>   duchain/clangparsingenvironment.h 7bb8111 
>   duchain/clangparsingenvironment.cpp 1decc14 
>   duchain/clangparsingenvironmentfile.h 953ee94 
>   duchain/clangparsingenvironmentfile.cpp b3d0563 
>   duchain/clangpch.cpp 1ce3457 
>   duchain/parsesession.h b688fb1 
>   duchain/parsesession.cpp f41768a 
>   duchain/tuduchain.cpp 33a0570 
>   tests/test_duchain.cpp 7db9fea 
> 
> Diff: https://git.reviewboard.kde.org/r/121757/diff/
> 
> 
> Testing
> -------
> 
> Tests fail in the same manner as before
> 
> 
> File Attachments
> ----------------
> 
> kdevelop patch
>   https://git.reviewboard.kde.org/media/uploaded/files/2015/01/02/5c0314bf-f241-4ad0-93f6-9a0a48a79135__kdevelop-hasincordef.diff
> platform patch
>   https://git.reviewboard.kde.org/media/uploaded/files/2015/01/02/edc11881-06c6-4570-9afd-824a99687116__kdevplatform-hasincordef.diff
> 
> 
> Thanks,
> 
> Olivier Jean de Gaalon
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20150108/5093a4c7/attachment-0001.html>


More information about the KDevelop-devel mailing list