Paths.ScratchPath.Decls =
BaseRecord->lookup(Context, Criteria.Method->getDeclName());
while (Paths.ScratchPath.Decls.first != Paths.ScratchPath.Decls.second) {
- CXXMethodDecl *MD =
- cast<CXXMethodDecl>(*Paths.ScratchPath.Decls.first);
-
- OverloadedFunctionDecl::function_iterator MatchedDecl;
- if (MD->isVirtual() && !IsOverload(Criteria.Method, MD, MatchedDecl)) {
- FoundPathToThisBase = true;
- break;
+ if (CXXMethodDecl *MD =
+ dyn_cast<CXXMethodDecl>(*Paths.ScratchPath.Decls.first)) {
+ OverloadedFunctionDecl::function_iterator MatchedDecl;
+ if (MD->isVirtual() &&
+ !IsOverload(Criteria.Method, MD, MatchedDecl)) {
+ FoundPathToThisBase = true;
+ break;
+ }
}
++Paths.ScratchPath.Decls.first;