why compare indexedTypes in Cpp::stripType(AbstractType::Ptr, DUContext*) ?

Milian Wolff mail at milianw.de
Wed Mar 2 17:35:57 UTC 2011


Milian Wolff, 02.03.2011:
> Hey David,
> 
> can you tell me why this conditional contains the indexedType comparison?
> 
> if(decls[0]->kind() != Declaration::Type || decls[0]->indexedType() !=
> type-
> 
> >indexed())
> 
> this breaks cases where you want to strip const Foo::Bar::Asdf& because:
> 
> a) the incoming type is "const Foo::Bar::Asdf" (baseType of the reference)
> b) we look for a declaration, hence find e..g the class "Foo::Bar::Asdf"
> (note: no const!)

I've now committed a fix/workaround for it, if you think it's wrong please 
tell me. Essentially I'm now removing the const bit before calling stripType - 
though maybe I should do that in stripType itself?

bye
-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20110302/19d10660/attachment-0001.sig>


More information about the KDevelop-devel mailing list