Review Request: specializeFrom for functions and template identifier free specializations

Olivier Jean de Gaalon olivier.jg at gmail.com
Sun Jun 19 22:35:51 UTC 2011



> On June 19, 2011, 6:14 p.m., Milian Wolff wrote:
> > languages/cpp/cppduchain/declarationbuilder.cpp, line 523
> > <http://git.reviewboard.kde.org/r/101690/diff/1/?file=24726#file24726line523>
> >
> >     has the QID no ctor taking a ID? If not, why? I'd assume this could also be optimized API-wise?

I should've commented this. For some reason the localID takes the form "ClassName::Foo". If I pass the localID to the QualifiedIdentifier it won't break it up into its parts (ie "ClassName", "Foo"). That means that it won't be able to stripPrefixes at all. If I pass it as a string however, it breaks it up as expected and all is well.

I'm not sure how Identifier vs QualifiedIdentifier is supposed to work, but I'm guessing that localID should actually be a QualifiedIdentifier.


> On June 19, 2011, 6:14 p.m., Milian Wolff wrote:
> > languages/cpp/cppduchain/tests/test_expressionparser.cpp, line 186
> > <http://git.reviewboard.kde.org/r/101690/diff/1/?file=24729#file24729line186>
> >
> >     when you print (->toString()) the specializedFrom - what does it say? Or is .data() = 0?

Yes, in the test, specializedFrom is always nil. I only bothered to trace it as far as "isSpecialization()", where for some reason "templDecl->templateContext(topContext)" is always nill. I'm guessing it has something to do with the test environment, but I'm hoping someone knows a workaround/solution.


- Olivier Jean de


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/101690/#review4027
-----------------------------------------------------------


On June 19, 2011, 7:51 a.m., Olivier Jean de Gaalon wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/101690/
> -----------------------------------------------------------
> 
> (Updated June 19, 2011, 7:51 a.m.)
> 
> 
> Review request for KDevelop and David Nolden.
> 
> 
> Summary
> -------
> 
> Set specializedFrom for TemplateDeclarations in more cases then before.
> Make expressionvisitor check specializedFrom to find type of "this".
> 
> Also adds a test that should work (works in normal usage), but in the test environment for some reason the template declarations never have a templateContext().
> 
> 
> This addresses bug 183614.
>     http://bugs.kde.org/show_bug.cgi?id=183614
> 
> 
> Diffs
> -----
> 
>   languages/cpp/cppduchain/declarationbuilder.h 2242da2 
>   languages/cpp/cppduchain/declarationbuilder.cpp 0423842 
>   languages/cpp/cppduchain/expressionvisitor.cpp eef33e3 
>   languages/cpp/cppduchain/tests/test_expressionparser.h 385568f 
>   languages/cpp/cppduchain/tests/test_expressionparser.cpp 22e123a 
> 
> Diff: http://git.reviewboard.kde.org/r/101690/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Olivier Jean de
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20110619/83fa850c/attachment.html>


More information about the KDevelop-devel mailing list