bool ClassScope::needsInvokeParent(AnalysisResultConstPtr ar, bool considerSelf /* = true */) { // check all functions this class has if (considerSelf) { for (const auto& func : m_functionsVec) { if (func->isPrivate()) return true; } } // walk up if (!m_parent.empty()) { ClassScopePtr super = ar->findClass(m_parent); return !super || super->isRedeclaring() || super->needsInvokeParent(ar); } return false; }
bool ClassScope::needsInvokeParent(AnalysisResultConstPtr ar, bool considerSelf /* = true */) { // check all functions this class has if (considerSelf) { for (FunctionScopePtrVec::const_iterator iter = m_functionsVec.begin(); iter != m_functionsVec.end(); ++iter) { if ((*iter)->isPrivate()) return true; } } // walk up if (!m_parent.empty()) { ClassScopePtr super = ar->findClass(m_parent); return !super || super->isRedeclaring() || super->needsInvokeParent(ar); } return false; }