const foo& - what is const - ReferenceType or ReferenceType::baseType ?
Milian Wolff
mail at milianw.de
Wed Mar 2 16:24:06 UTC 2011
Hey David,
just spotted an issue in the shortenedTypeIdentifier, it checks whether the
identifier is a const ref using this code:
bool isReference = false;
bool isConstReference = false;
if(type.cast<ReferenceType>()) {
isReference = true;
isConstReference = type.cast<ReferenceType>()->modifiers() &
AbstractType::ConstModifier;
type = type.cast<ReferenceType>()->baseType();
}
But the reality shows: Not the ReferenceType is const, but it's baseType! So
I'll fix it here, but I wonder whether this could not be hit elsewhere? Should
the ReferenceType maybe return the same modifiers as it's baseType to prevent
such problems?
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/fa21fec8/attachment.sig>
More information about the KDevelop-devel
mailing list