]> granicus.if.org Git - clang/commitdiff
Don't insert class templates into the DynamicClasses vector.
authorAnders Carlsson <andersca@mac.com>
Tue, 25 Jan 2011 18:08:22 +0000 (18:08 +0000)
committerAnders Carlsson <andersca@mac.com>
Tue, 25 Jan 2011 18:08:22 +0000 (18:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124201 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/Sema.cpp
lib/Sema/SemaDeclCXX.cpp

index ca69d69959cac791ffba0e2e81e43276ffe8f79a..60cfd47e0f0cf2e02dd2923e5aec65941ee193d9 100644 (file)
@@ -290,6 +290,8 @@ void Sema::ActOnEndOfTranslationUnit() {
     // this translation unit, then those vtables are considered "used" and must
     // be emitted.
     for (unsigned I = 0, N = DynamicClasses.size(); I != N; ++I) {
+      assert(!DynamicClasses[I]->isDependentType() &&
+             "Should not see dependent types here!");
       if (const CXXMethodDecl *KeyFunction
           = Context.getKeyFunction(DynamicClasses[I])) {
         const FunctionDecl *Definition = 0;
index 25d0a5effed95c687e8281b1cbd4fb02069f0094..d5dea78230672e3d95e3f02f25249f6115d5b8f7 100644 (file)
@@ -2746,7 +2746,7 @@ void Sema::CheckCompletedCXXClass(CXXRecordDecl *Record) {
     }
   }
 
-  if (Record->isDynamicClass())
+  if (Record->isDynamicClass() && !Record->isDependentType())
     DynamicClasses.push_back(Record);
 
   if (Record->getIdentifier()) {