SVal StoreManager::evalDerivedToBase(SVal Derived, const CXXBasePath &Path) { // Walk through the path to create nested CXXBaseRegions. SVal Result = Derived; for (CXXBasePath::const_iterator I = Path.begin(), E = Path.end(); I != E; ++I) { Result = evalDerivedToBase(Result, I->Base->getType()); } return Result; }
// Outputs a C++ inheritance chain as a diagnostic aid. void FindBadConstructsConsumer::PrintInheritanceChain(const CXXBasePath& path) { for (CXXBasePath::const_iterator it = path.begin(); it != path.end(); ++it) { diagnostic().Report(it->Base->getLocStart(), diag_note_inheritance_) << it->Class << it->Base->getType(); } }