Review Request 120086: Fix cursorSpellingNameRange range for out-of-line functions.
Milian Wolff
mail at milianw.de
Sun Sep 7 12:42:03 UTC 2014
> On Sept. 7, 2014, 9:10 a.m., Milian Wolff wrote:
> > Sergey, can you explain why this is an issue for out-of-line methods? Is the Identifier for e.g. "foo::bar" not "bar", but something else? Or is the range start column pointing to "foo" instead of "bar" and then adding the length of the Identifier to it makes it wrong?
>
> Milian Wolff wrote:
> note: when it's the latter, e.g. if the scope is wrongly taken into account, is there a way to change the clang_Cursor_getSpellingNameRange call to start at the "bar"?
>
> Sergey Kalinichev wrote:
> Example:
> class foo {
> void bar();
> };
> // Here is the id.toString() == "foo::bar", range start column at bar
> void foo::bar(){
> }
>
> So, if I understand you right the id.toString() should be just "bar"? And it should be fixed in some other place then?
>
> Olivier Jean de Gaalon wrote:
> See TUDUChain::makeId, where kdev-clang special cases CXXMethod identifiers. I was not aware this is done. Oldcpp did the same thing, but I'd like to find a better solution; maybe creating helper contexts with the class identifier.
The Identifier should be "foo", the QualifiedIdentifier otoh should be "foo::bar".
- Milian
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120086/#review65956
-----------------------------------------------------------
On Sept. 7, 2014, 6:20 a.m., Sergey Kalinichev wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120086/
> -----------------------------------------------------------
>
> (Updated Sept. 7, 2014, 6:20 a.m.)
>
>
> Review request for KDevelop.
>
>
> Repository: kdev-clang
>
>
> Description
> -------
>
> This was accidentally broken by:
> f17866db1bc24c198e87c028065796959f6dd135
> Author: Kevin Funk <kfunk at kde.org>
> Date: Mon Aug 4 16:53:06 2014 +0200
>
> Also fix ranges for operator functions
>
>
> Diffs
> -----
>
> duchain/clanghelpers.cpp fb69a66
> tests/files/functiondefinitiondeclarations.cpp fe4050e
>
> Diff: https://git.reviewboard.kde.org/r/120086/diff/
>
>
> Testing
> -------
>
> All tests pass.
>
>
> Thanks,
>
> Sergey Kalinichev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20140907/293894fd/attachment.html>
More information about the KDevelop-devel
mailing list