Review Request 125301: Don't show explicitly deleted/default functions in implments completion

Milian Wolff mail at milianw.de
Fri Sep 18 19:54:52 UTC 2015


> On Sept. 18, 2015, 7:51 p.m., Milian Wolff wrote:
> > In general I'm in favor of getting this hack in until we have Sergeys fixes upstream. At that point, we can replace the hacks conditionally with a version check and use the real deal.
> > 
> > Note that your regexes will break when someone adds `/*...*/` comments where you expect spaces, of if that string occurrs within a default argument string literal... But this is a hack and I think it's OK to live with this limitation until its fixed properly upstream.

Thinking a bit more about this, could we maybe replace the costly regex magic with simple interpretation of the token stream? Not sure whether it's faster, but I think it's going to be more reliable. You'd "simply" need to run `clang_tokenize` on the range of the cursor and search for a `CXToken_Keyword` at the end that represents `default` or `delete`.


- Milian


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


On Sept. 18, 2015, 6:20 p.m., Alex Richardson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125301/
> -----------------------------------------------------------
> 
> (Updated Sept. 18, 2015, 6:20 p.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdev-clang
> 
> 
> Description
> -------
> 
> Don't show explicitly deleted/default functions in implments completion
> 
> 
> Diffs
> -----
> 
>   codecompletion/completionhelper.cpp df5712bb31dfa39e99a593367036d42dc41701d1 
>   tests/test_codecompletion.cpp a2ed37f55995a8d224512d59b187dba1a80ed446 
>   util/clangutils.h af80b906eb1ca466f110c8c12637568ab1a52fc4 
>   util/clangutils.cpp 506dfdeeeccf4d665a53d0b1ebaaa608a7ec9cb5 
> 
> Diff: https://git.reviewboard.kde.org/r/125301/diff/
> 
> 
> Testing
> -------
> 
> Tests pass except for the global deleted function.
> 
> Not sure how to fix this as it seems like clang_getCursorExtent(declCursor) is wrong in that case. Or maybe I need to calaculate the range differently?
> 
> 
> Thanks,
> 
> Alex Richardson
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20150918/12e16596/attachment.html>


More information about the KDevelop-devel mailing list