[cfe-commits] r89967 - /cfe/trunk/lib/Sema/SemaDeclCXX.cpp

Anders Carlsson andersca at mac.com
Thu Nov 26 13:25:09 PST 2009


Author: andersca
Date: Thu Nov 26 15:25:09 2009
New Revision: 89967

URL: http://llvm.org/viewvc/llvm-project?rev=89967&view=rev
Log:
When adding an implicit destructor, make sure to mark it as virtual if it overrides existing destructors.

Modified:
    cfe/trunk/lib/Sema/SemaDeclCXX.cpp

Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=89967&r1=89966&r2=89967&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Thu Nov 26 15:25:09 2009
@@ -2171,6 +2171,8 @@
     Destructor->setImplicit();
     Destructor->setTrivial(ClassDecl->hasTrivialDestructor());
     ClassDecl->addDecl(Destructor);
+    
+    AddOverriddenMethods(ClassDecl, Destructor);
   }
 }
 





More information about the cfe-commits mailing list