diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-08-25 16:37:49 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-08-25 16:37:49 +0000 |
commit | c87efbd2cbd13e68ea771275f03d1bbd1b741e47 (patch) | |
tree | 9b411d3f54803c50d7bfd939310b23e39b1d2d8a /lib/AST/DeclCXX.cpp | |
parent | 53ca798699f0a7ba80c4e5b17867ebba6ad1812e (diff) |
Skip over bases/fields with dependent types.
Fixes pr4771.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79999 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclCXX.cpp')
-rw-r--r-- | lib/AST/DeclCXX.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/AST/DeclCXX.cpp b/lib/AST/DeclCXX.cpp index 174e8b6cd3..e3a0f486d5 100644 --- a/lib/AST/DeclCXX.cpp +++ b/lib/AST/DeclCXX.cpp @@ -529,6 +529,8 @@ CXXDestructorDecl::computeBaseOrMembersToDestroy(ASTContext &C) { for (CXXRecordDecl::base_class_iterator VBase = ClassDecl->vbases_begin(), E = ClassDecl->vbases_end(); VBase != E; ++VBase) { + if (VBase->getType()->isDependentType()) + continue; // Skip over virtual bases which have trivial destructors. CXXRecordDecl *BaseClassDecl = cast<CXXRecordDecl>(VBase->getType()->getAs<RecordType>()->getDecl()); @@ -543,6 +545,8 @@ CXXDestructorDecl::computeBaseOrMembersToDestroy(ASTContext &C) { E = ClassDecl->bases_end(); Base != E; ++Base) { if (Base->isVirtual()) continue; + if (Base->getType()->isDependentType()) + continue; // Skip over virtual bases which have trivial destructors. CXXRecordDecl *BaseClassDecl = cast<CXXRecordDecl>(Base->getType()->getAs<RecordType>()->getDecl()); |