sbenza added inline comments. ================ Comment at: include/clang/AST/DeclCXX.h:1830 @@ -1829,2 +1829,3 @@ unsigned size_overridden_methods() const; + const ArrayRef<const CXXMethodDecl *> overridden_methods() const; ---------------- Return type should have have toplevel `const`.
================ Comment at: lib/AST/ASTContext.cpp:1262 @@ -1261,2 +1261,3 @@ ASTContext::overridden_methods_begin(const CXXMethodDecl *Method) const { llvm::DenseMap<const CXXMethodDecl *, CXXMethodVector>::const_iterator Pos + = OverriddenMethods.find(Method->getCanonicalDecl()); ---------------- I would invert the calls here. That is, make overridden_methods_begin/_end call overridden_methods() instead, and have overridden_methods() be the one that does the lookup. This way we have a single place where the lookup happens. It would also make overridden_methods() faster. http://reviews.llvm.org/D19324 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits