]> granicus.if.org Git - clang/commitdiff
Eliminate an uninteresting assertion; invalid code involving
authorDouglas Gregor <dgregor@apple.com>
Wed, 20 Apr 2011 17:22:00 +0000 (17:22 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 20 Apr 2011 17:22:00 +0000 (17:22 +0000)
out-of-line destructors can result in the addition of redundant
destructors to a class. It's not harmful to the AST. Fixes
<rdar://problem/9158632>.

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

lib/AST/DeclCXX.cpp

index 8cfb12a72e64c6fb72a82873d95b022f0e44d374..54c8c359863032fe452c88743672da8561ce84f2 100644 (file)
@@ -813,8 +813,6 @@ CXXDestructorDecl *CXXRecordDecl::getDestructor() const {
     return 0;
 
   CXXDestructorDecl *Dtor = cast<CXXDestructorDecl>(*I);
-  assert(++I == E && "Found more than one destructor!");
-
   return Dtor;
 }