Add flag to declarations marking them as auto/deduced?

Michal Srb michalsrb at gmail.com
Tue Aug 14 13:49:47 BST 2018


2018-08-14 13:49 GMT+02:00 Sven Brauch <mail at svenbrauch.de>:
>> * Is it ok to add such information to the Declaration?
>
> I would say yes. The bitfield currently has 8 items unfortunately, so it will
> increase the size of each Declaration by 1 byte, but ok.

At least on x86_64 there are currently 2 bytes of padding at the end
of DeclarationData, so it should not increase the size. Unless there
is some trickery to pack them tighter.

> Don't forget to increase KDEV_ITEMREPOSITORY_INCREMENT in CMakeLists.txt!

Ok!

>> * How should it be called? There is already a flag called
>> `isAutoDeclaration`/`setAutoDeclaration`, which does not seem to be
>> used at all.
>
> No, that is used for something different, but not by C++ (it's used by
> Python). It marks declarations which were implicitly created by a member
> access.

I see.

> Maybe something like "isExplicitlyTyped" or "isImplicitlyTyped" or
> "isTypeAutoDeduced" or so?

I'll go with "isExplicitlyTyped" for now.

Thank you for the answer!

Best regards,
Michal Srb


More information about the KDevelop-devel mailing list