diff options
Diffstat (limited to 'lib/AST/CXXInheritance.cpp')
-rw-r--r-- | lib/AST/CXXInheritance.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/AST/CXXInheritance.cpp b/lib/AST/CXXInheritance.cpp index 24e96ba380..9314cfde7c 100644 --- a/lib/AST/CXXInheritance.cpp +++ b/lib/AST/CXXInheritance.cpp @@ -637,8 +637,7 @@ void FinalOverriderCollector::Collect(const CXXRecordDecl *RD, OMEnd = BaseOverriders->end(); OM != OMEnd; ++OM) { - const CXXMethodDecl *CanonOM - = cast<CXXMethodDecl>(OM->first->getCanonicalDecl()); + const CXXMethodDecl *CanonOM = OM->first->getCanonicalDecl(); Overriders[CanonOM].add(OM->second); } } @@ -649,7 +648,7 @@ void FinalOverriderCollector::Collect(const CXXRecordDecl *RD, if (!M->isVirtual()) continue; - CXXMethodDecl *CanonM = cast<CXXMethodDecl>(M->getCanonicalDecl()); + CXXMethodDecl *CanonM = M->getCanonicalDecl(); using OverriddenMethodsRange = llvm::iterator_range<CXXMethodDecl::method_iterator>; OverriddenMethodsRange OverriddenMethods = CanonM->overridden_methods(); |