[Differential] [Commented On] D583: Fix DUChainUtils::getInheriters.

mwolff (Milian Wolff) noreply at phabricator.kde.org
Tue Nov 24 14:21:25 UTC 2015


mwolff added a subscriber: mwolff.
mwolff added a comment.

Just a question: Is the clang builder correct in importing the base for the case you have in your unit test?

  class foo { class inner {}; };

Why is `inner` importing `foo` - does anyone know? If that wouldn't be the case, then this patch here wouldn't be required. So before we accept this patch, I'd appreciate if someone could dig in a bit deeper and clarify whether it isn't a bug in kdev-clang that triggers the issue, instead of a generic DUChain issue here.


INLINE COMMENTS
  language/duchain/duchainutils.cpp:485 use auto
  language/duchain/duchainutils.cpp:490 please merge the conditionals and add braces. also use longer variable names:
  
  
      FOREACH_FUNCTION(const auto& base, childClass->baseClasses) {
          auto structureType = base.baseClass.type<StructureType>());
          if (structureType && structureType->declaration(topContext) == base) {
              return true;
          }
      }
  
  The surrounding code really should be cleaned up by someone from us eventually... Not your fault/concern of course.

REPOSITORY
  rKDEVPLATFORM KDevPlatform

REVISION DETAIL
  https://phabricator.kde.org/D583

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: gsmolarczyk, KDevelop
Cc: mwolff, kdevelop-devel, arrowdodger


More information about the KDevelop-devel mailing list