Review Request 117922: Preliminary implementation of adjust signature helper

Kevin Funk kfunk at kde.org
Fri May 2 13:52:35 UTC 2014


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


As others already mentioned, StaticCodeAssisant (which you've now named ClangCodeAssistant) will be moved to kdevplatform, so other languages can benefit from it, too. I have a local branch in kdevplatform, where I have a cleaned up version of StaticCodeAssistant already. There's some more work needed in order to make it accessible from language plugins, which I'm planning to do in my first week of GSoC (ie. in ~2 weeks).

So, in other words. ClangCodeAssistant is very likely going to be dropped soonish. Like Milian said, let's ignore that for now and make sure your patch gets in either way.

Just some general remarks:
- I'd suggest not putting any more effort into porting stuff which uses or is invoked by StaticCodeAssistant (as I already have intrusive local changes which I didn't upstream yet)
- ClangSignatureAssistant still makes sense, it won't go away.
- And as others have said: Please make sure to add some tests as well (feel free to do that in a follow-up commit, but please do it) :)



codegen/clangsignatureassistant.cpp
<https://git.reviewboard.kde.org/r/117922/#comment39816>

    That's a bit overcomplicated, IMO, and not really the C++-way. Just return the session-ptr. The caller needs to check against nullptr then.
    
    Also: const& 'url'



codegen/clangsignatureassistant.cpp
<https://git.reviewboard.kde.org/r/117922/#comment39815>

    Nitpick: Newline after template<>



codegen/clangsignatureassistant.cpp
<https://git.reviewboard.kde.org/r/117922/#comment39817>

    const& for params?



codegen/clangsignatureassistant.cpp
<https://git.reviewboard.kde.org/r/117922/#comment39819>

    This assignment here ('otherSide =') in the if-condition is *very* hideous. Can you re-write that?



codegen/clangsignatureassistant.cpp
<https://git.reviewboard.kde.org/r/117922/#comment39820>

    Please use ClangLocation here and turn it into a DocumentCursor.
    
    Note: I've just pushed some changes related to ClangLocation that makes it work with DocumentCursor.



codegen/clangsignatureassistant.cpp
<https://git.reviewboard.kde.org/r/117922/#comment39821>

    Again, not really the C++ way. Why not just returning SimpleCursor?



util/clangutils.h
<https://git.reviewboard.kde.org/r/117922/#comment39823>

    Please add a TODO stating that we should get rid off this as soon as we depend on Clang 3.5



util/clangutils.cpp
<https://git.reviewboard.kde.org/r/117922/#comment39822>

    Remove extra whitespace.


- Kevin Funk


On May 1, 2014, 5:08 a.m., David Stevens wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/117922/
> -----------------------------------------------------------
> 
> (Updated May 1, 2014, 5:08 a.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdev-clang
> 
> 
> Description
> -------
> 
> This is a preliminary implementation of the adjust signature helper. It works fairly well under normal usage, but it runs into problems if the user starts trying to use it at a high frequency. There are some rather fundamental issues both due to the different information organization (files vs translation units) and due to the discrepencies between what KDevelop has in the text editor and what clang has in the translation units. Hopefully I can get some feedback on the implementation.
> 
> 
> Diffs
> -----
> 
>   clangsupport.h 1316f88 
>   clangsupport.cpp 5e3f464 
>   codecompletion/completionhelper.cpp dfaf6b3 
>   codegen/CMakeLists.txt 0b913bd 
>   codegen/clangcodeassistant.h PRE-CREATION 
>   codegen/clangcodeassistant.cpp PRE-CREATION 
>   codegen/clangsignatureassistant.h PRE-CREATION 
>   codegen/clangsignatureassistant.cpp PRE-CREATION 
>   tests/CMakeLists.txt c2fd36d 
>   util/clangutils.h 3516821 
>   util/clangutils.cpp a74017c 
> 
> Diff: https://git.reviewboard.kde.org/r/117922/diff/
> 
> 
> Testing
> -------
> 
> Manual. Any unit tests would be deeply tied into the GUI, so I'm not sure how to go about writing those. The old c++ plugin unfortunately doesn't have any tests to work off of.
> 
> 
> Thanks,
> 
> David Stevens
> 
>

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


More information about the KDevelop-devel mailing list