]> granicus.if.org Git - clang/commitdiff
Compute end_overridden_methods in a way that keeps ENABLE_EXPENSIVE_CHECKS
authorDaniel Dunbar <daniel@zuster.org>
Sun, 2 Aug 2009 01:48:29 +0000 (01:48 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Sun, 2 Aug 2009 01:48:29 +0000 (01:48 +0000)
happy.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77850 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/DeclCXX.cpp

index 4a2f799b273ae8f4feff6462a8543e5169b370f8..ad015d12dee1445ba6d456e4009d56a6437ce36e 100644 (file)
@@ -362,7 +362,7 @@ CXXMethodDecl::method_iterator CXXMethodDecl::end_overridden_methods() const {
   if (it == OverriddenMethods->end() || it->second->empty())
     return 0;
 
-  return &(*it->second)[it->second->size()];
+  return &(*it->second)[0] + it->second->size();
 }
 
 QualType CXXMethodDecl::getThisType(ASTContext &C) const {