DUChain support of defaulted/deleted functions again

Milian Wolff mail at milianw.de
Mon Jun 20 09:38:11 UTC 2011


On Sunday 19 June 2011 22:13:29 David Nolden wrote:
> Do we even need to track deleted declarations at all? Wouldn't it be
> enough to simply not create them? Or is it possible to delete
> explicity inherited declarations from parent classes?

Imo: Yes, we need to track it.

An excerpt from 8.4.3 of the spec:

> 2. A program that refers to a deleted function implicitly or explicitly,
> other than to declare it, is ill-formed.

Hence
=> we want to report an error when someone tries to use a deleted function
=> we don't want to offer it during code completion

Especially for the former, having a proper definition (following the spec) for 
the deleted function is a huge advantage. The whole lookup mechanism including 
ADL etc. pp. will work as usual. When the "best match" is explicitly deleted 
though, we need to rise an error.

> Otherwise, this whole thing remembers me in AliasDeclaration, which is
> created among other things by the "using ...;" directive. Maybe a
> deleted declaration should simply be an AliasDeclaration which points
> to some special "deleted" declaration or AbstractType or to no
> declaration at all.

This approach would require lots of special casing elsewhere, esp. in 
navigation contexts and context browsing I assume, as well as code completion.

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/20110620/8a9c34ca/attachment.sig>


More information about the KDevelop-devel mailing list