[Differential] [Commented On] D3580: Investigate warnings and fix where it's possible and needed (kdevplatform) 
ematirov (Mikhail Ivchenko)
noreply at phabricator.kde.org
Sat Dec 3 16:07:02 UTC 2016
ematirov added inline comments.
> // Don't insert unknown or forward declarations into the class browser
> - if ( (item.kind & CodeModelItem::Unknown) || (item.kind & CodeModelItem::ForwardDeclaration) )
> + if ( CodeModelItem::Unknown || (item.kind & CodeModelItem::ForwardDeclaration) )
Testing for CodeModelItem::Unknown makes no sense there since it's constant (0).
The problem of original check is that (item.kind & 0) == 0 with any value of item.kind, so it doesn't check anything.
Probably solutions are:
1. check if item.kind is equal to CodeModelItem::Unknown instead of using bitwise operation there;
2. change value of CodeModelItem::Unknown to some power of 2 which is not used yet in CodeModelItem::Kind values.
Probably first one will go but I'll prefer to hear @kfunk's opinion on that
To: spencerb, #kdevelop, kfunk, ematirov
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KDevelop-devel